Live data from Hacker News

Left to Right Programming

graic.net

241–250 of 372 posts

Re: Left to Right Programming

#241
post #139
post #106

Earlier quoted context omitted.

My main caveat here, is that often the person starting a select knows what they want to select before they know where to select it from. To that end, having autocomplete for the sources of columns is far far more useful than autocomplete for columns from a source. I will also hazard a guess that the total number of columns most people would need autocomplete for are rather limited? Such that you can almost certainly…

Seems nonsensical. Column names have no meaning without the table. Table is the object, columns are the properties. What language goes Property.Object? All popular languages have this wrong?

When languages use order property, object - it's usually because they treat the properties as functions.

name(object) makes as much sense as object.name

Re: Left to Right Programming

#242

Reading through this article only elicits a "WTF!?" from me. Your editor can’t help you out as you write it. You shouldn't need handholding when you're writing code. It seems like the whole premise of the author's argument is that you shouldn't learn anything about the language and programming should be reduced to choosing from an autocomplete menu and never thinking more than that. I've seen developers who (try to)…

And we don't need navigation systems on our cars because we should know where we're going, right? ;)

Jokes apart, I think you're being too drastic. A good auto-complete is a nice feature, just like auto-indent, tab-complete, etc. Can it be abused? Sure. So what? Should we stop making it better for fear of abuse?

The reference to AI is far-fetched, too. We're talking about tools to help you with the syntax, not the semantic. I may forget if the function is called read, fread, or file_read, but I know what its effect is.

And finally, consider that if something is easier to parse for an editor, it most probably is for a human too. Not a rule, not working in 100% of cases, but usually exposing the user to the local context before the concept itself helps understanding.

Re: Left to Right Programming

#243

Another point to this is that we should switch to writing the numbers in the right order too: 123 should be three-hundred-twenty-one. This way, as soon as you type "1", it is truly one, you add a "2" and you know that's adding twenty... IIRC Arabic gets this right! /s

Haha. Except in Arabic numbers are written as in English.

Re: Left to Right Programming

#244
post #199

This is almost FP vs OOP religious war in disguise. Similar to vim-vs-emacs ... where op comes first in vim but selection comes first in emacs. If you design something to "read like English", you'll likely get verb-first structure - as embodied in Lisp/Scheme. Other languages like German, Tamil use verbs at the end, which aligns well with OOP-like "noun first" syntax. (It is "water drink" word for word in Tamil but "…

[deleted]

Re: Left to Right Programming

#245

Earlier quoted context omitted.

I'd argue it's because the web is the dominant platform for many applications and no other languages can offer a first class experience. if WASM had direct access to the DOM and web APIs and maybe a little more runtime support to lessen the bloat, I'd use something else.

JavaScript has been a backend language long before the web was the dominant platform. And one of the, admittedly many, reasons why web technologies like Electron and React Native exist is because it’s easier to find JavaScript developers vs Kotin, Qt or whatever. So youre not wrong but you’re also downplaying the network effect that led to the web becoming dominant. And a part of that was because developers didn’t wa…

> JavaScript has been a backend language long before the web was the dominant platform.

I don't think this holds.

JavaScript was created as a frontend language specifically for web browsers.

It wasn't until 2009 with the introduction of Node.js that JavaScript became a viable option for backend development.

The web was already the dominant platform by then.

Re: Left to Right Programming

#246
post #72

The consensus here seems to be that Python is missing a pipe operator. That was one of the things I quickly learned to appreciate when transitioning from Mathematica to R. It makes writing data science code, where the data are transformed by a series of different steps, so much more readable and intuitive. I know that Python is used for many more things than just data science, so I'd love to hear if in these other co…

The next step after pipe operators would be reverse assignment statements to capture the results. I find myself increasingly frustrated at seeing code like 'let foo = many lines of code'. Let me write something like 'many lines of code =: foo'.

R does have a right assign operator, namely ->

It's use is discourages in most style guides. I do not use it in scripts, but I use it heavily in console/terminal workflows where I'm experimenting.

df |> filter() |> summarise() -> x

x |> mutate() -> y

plot(y)

Re: Left to Right Programming

#247

It's nice if after typing `file.` you see what functions you can use. But what if there end up being too many options? What's next, a fuzzy finding search box for all possible functions? Contextually relevant ones based on the code you've already written?

> But what if there end up being too many options? That would suggest the file object needs to be refactored and split. > What's next, a fuzzy finding search box for all possible functions? Contextually relevant ones based on the code you've already written? IDEs already provide both those options.

I understand, I think I moreso wanted to hint that there may still be more room for exploration when it comes to things like this.

However, while I agree, I do want to challenge you to explain/show if and why this is the case (I know that you wrote "suggest"):

> That would suggest the file object needs to be refactored and split.

Re: Left to Right Programming

#248

Another point to this is that we should switch to writing the numbers in the right order too: 123 should be three-hundred-twenty-one. This way, as soon as you type "1", it is truly one, you add a "2" and you know that's adding twenty... IIRC Arabic gets this right! /s

Haha. Except in Arabic numbers are written as in English.

Right, but all the other letters are written right-to-left too :)

Re: Left to Right Programming

#249
post #219

Don’t know why python gets so much love. It’s a painful language as soon as more than one person is involved. What the author describes is just the tip of the iceberg

Failure to understand something is not a virtue. That it does get a lot of love strongly suggests that there are reasons for that. Of course it has flaws, but that alone doesn't tell us anything; only comparisons do. Create a comprehensive pro/con list and see how it fares. Then compare that to pro/con lists for other languages.

> Of course it has flaws, but that alone doesn't tell us anything; only comparisons do.

Comparisons won't tell us anything. If Python were the only programming language in existence, that doesn't imply that it would be loved. Or, if we could establish that Python is the technically worst programming language to ever be created, that doesn't imply that wouldn't be loved. Look at how many people in the world love other people who are by all reasonable measures bad for them (e.g. abusive). Love isn't rational. It is unlikely that it is possible for us to truly understand.

Re: Left to Right Programming

#250
post #219

Don’t know why python gets so much love. It’s a painful language as soon as more than one person is involved. What the author describes is just the tip of the iceberg

Failure to understand something is not a virtue. That it does get a lot of love strongly suggests that there are reasons for that. Of course it has flaws, but that alone doesn't tell us anything; only comparisons do. Create a comprehensive pro/con list and see how it fares. Then compare that to pro/con lists for other languages.

[deleted]
Post reply on HN