Hacker News new | ask | show | jobs
by llm_trw 569 days ago
>Your language should be designed such that the cutoff is up to you, the writer of the code, and really just a matter of syntax, not semantics.

I have more important things to think about in my code than when I switch between two dialects of the language.

Especially since I get no extra expressive power by doing so.

>Obviously, I (usually) would not want to write things like

Or just use (+ (* a b) (* c d)) which is simpler that any of the example above. Then I can chose between any of:

    ( +
      (* a b)
      (* c d))

    ( +
      ( *
       a
       b
      )
      ( *
        c
        d
      ) 
    )
    
Or whatever else you want to do.

>As the border between these can be fluid, where you choose the cutoff will depend on the situation and also be fluid.

It's only fluid because you've had XX years of infix notation caused brain damage to make you think that.

2 comments

> I have more important things to think about in my code than when I switch between two dialects of the language.

Granted. The example I gave was just to demonstrate that switching between the styles is not a problem and can be fluid, if you need it to be.

> It's only fluid because you've had XX years of infix notation caused brain damage to make you think that.

No, infix is just easier to read and understand, it matches up better with the hardware in our brains for language. If that is different for you, well ... you mentioned brain damage first.

The average programmer has 12 years of education before they have a chance to see superior notations like prefix and postfix.

Of course you'll think that the two are weird when you've never had a chance to use them before you're an adult.

Much like how adults who are native english speakers see nothing wrong with the spelling, but children and everyone else does.

> Or just use (+ (* a b) (* c d)) which is simpler that any of the example above. Then I can chose between any of:

That's the exact same flexibility but in a different order. It's not simpler.