Author Topic: Keyword "float" is not good to identify numbers  (Read 96 times)

acbaile

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Keyword "float" is not good to identify numbers
« on: October 08, 2018, 09:15:26 PM »
    If to use float32 and float64...

    It seems, word float is reduced form of verb "flow" in past tense. Sound "flowed" is very close to float. English irregularity from depth of ages. Meaning is close too.

    So, we have keyword with meaning of flowed away (or leaked) water - meaning of spontaneous behavior with loosing of form and content. This association is not good for numbers: numbers must be precise. It's like number loosing its precision.

    This keyword makes not good influence on thinking of programmer. Not so bad like void, but - in relation with numbers - it is not desirable to think it too. It is better to replace it with another keyword.

    Proposal is real. Meaning is direct: int - for integer numbers, real - for real numbers. Keywords are: real32 and real64.
« Last Edit: November 20, 2018, 02:15:06 PM by acbaile »

acbaile

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Keyword "float" is not good to identify numbers
« Reply #1 on: November 15, 2018, 07:39:50 PM »
    I vote for real32 and real64. I used them during this time. It looks good.
« Last Edit: November 18, 2018, 02:32:24 AM by acbaile »

lerno

  • Full Member
  • ***
  • Posts: 218
    • View Profile
Re: Keyword "float" is not good to identify numbers
« Reply #2 on: November 16, 2018, 08:08:59 PM »
There are two dimensions:

1. What reads best
2. What people are used to

I'd say that with sufficient familiarity of a term, it becomes easier to understand than something with an objectively better name. "float32, float64, f32, f64" is in use a lot, "real32, real64" isn't.

I have a weak spot for "real" out of nostalgia for Pascal, but I'd say I'm an exception.

acbaile

  • Jr. Member
  • **
  • Posts: 89
    • View Profile
Re: Keyword "float" is not good to identify numbers
« Reply #3 on: November 18, 2018, 12:36:20 AM »
I have a weak spot for "real" out of nostalgia for Pascal, but I'd say I'm an exception.

    Nothing from Pascal. Reasons are in starting post of this topic.

    Pascal can not have exclusive right for word real. I never used Pascal.
« Last Edit: November 20, 2018, 02:12:40 PM by acbaile »