5 ms·
In my opinion, let num = 10 is not bullshit free, num = 10 is.
by LittlePeter 6y ago
In my opinion, let num = 10 is not bullshit free, num = 10 is.
- garritfra 6y agoThat's highly subjective. I see where you're coming from, but I personally think that num = 10 is weird to read.
- protomyth 6y agoWell, there is an argument for := or <- for assignments.
- chordalkeyboard 6y ago> there is an argument Lol
- garritfra 6y agoI personally don't consider that syntax bs-free. When coming from another language, it's quite likely that you haven't encountered that syntax before.
- protomyth 6y agoAnyone who grew up with Pascal has seen := a lot. On a personal note, I do hate the overloading of =.
- eyelidlessness 6y agoIt’s not entirely subjective. For the majority of languages with a `let` keyword, it creates a binding which can’t be reassigned. JS is the only major language I’m aware of that breaks this expectation, and uses `const` instead. In fact, I had assumed Sabre followed the more common pattern, and was quite surprised to discover it doesn’t later in the docs. I think that’s a pretty clear case of “bullshit” in the sense described in the README.
- dragonwriter 6y ago> For the majority of languages with a `let` keyword, it creates a binding which can’t be reassigned. JS is the only major language I’m aware of that breaks this expectation The whole BASIC family, including the VB subfamily, also breaks it, though in some (including VB) LET is an optional noise keyword and not required.
- eyelidlessness 6y agoThat’s fair and a reasonable contradiction. Though I’d say that’s more in line with the huge range of optional keywords in SQL that are more a matter of readability preference than syntax.
- steve_taylor 6y agoImplicit declaration is bullshit. It allows new variables to accidentally be created out of typos. Sabre should have gone with var. Without knowledge of existing languages, the meaning of let isn’t exactly obvious.
- tines 6y agoI'd say that a knowledge of mathematics is where the meaning of "let" will most often come from. I'm sure we've all read things like "Let x be the speed of a train..."
- phabora 6y agoLet n be the number of comments about syntax in this thread and let total be the number of comments: n / total.
- postalrat 6y agolet num = 10 spot the typo
- deleted 6y ago[deleted]
- carapace 6y agoVariables are overrated. 10 is BS-free.