Live data from Hacker News

Ask HN: How would a programming language look if designed by non-programmer

news.ycombinator.com

81–90 of 132 posts

Re: Ask HN: How would a programming language look if designed by non-programmer

#81
post #66

Take a look at Ladder Logic: https://en.wikipedia.org/wiki/Ladder_logic I don't think this was necessarily created by non-programmers, but it was certainly created for them. The language is designed to mimic electrical schematics with the idea being electricians, electrical engineers, etc can easily program and debug in the language. I'm a software engineer who has worked extensively programming PLCs with Ladder Logi…

oh shit I've spend probably 20-40 hours with those and I must say that I like "normal" programming more

Yes I certainly do too, but working with ladder logic can force you to think very differently and solve interesting problems in different ways. You can monitor exactly how the code is running at any given time, you can directly edit it while it's running, and you set the value of any variable at any time.

Re: Ask HN: How would a programming language look if designed by non-programmer

#82
Ad hoc, it would be The Homer of programming languages if allowed to grow unfettered. Short of that, it would be a DSL oriented towards their particular needs. Possibly graphically oriented. Meaning something more like LabView or perhaps Excel, with a heavy visual component that lends itself well to people who are not experienced enough to visualize a complex abstract system or who need to communicate the graphical model to others.

For instance, a friend worked in "manpower" (operations research work, trying to understand and improve the workflow of a 15k person industrial workforce). One of the tools was a hybrid of a graphical model + R-kin language. The model looked like any ordinary flowcharting kind of thing, though the data attached were numbers like throughput, reliability, etc. And when "executed" it would produce a report based on real or modeled data about expected results. The graphical model lended itself well both for the users (would you want to write out thousands of lines of: engine removed -> load engine on cart -> move cart to workroom -> clean engine -> ...?) and the people it was meant to communicate with ("Is this really your workflow? Do we have a detail wrong?"). The R-kin language was something that she made use of, but mostly for generating reports and it was, to her, "math" not "programming".

Re: Ask HN: How would a programming language look if designed by non-programmer

#83

Earlier quoted context omitted.

> One would have to seek out someone with a nearly programming language formality in their logical thinking, such as a mathematician, or linguist I’ll give you some examples of people who possess the kind of logical mind you describe here yet lack programming ability: - lawyers work with legal code trying to figure out ways to hack it to help their clients. Say what you will about lawyers, but they are good at findin…

Just because a teacher can describe steps, that doesn't mean that it would be easy to make a computer do it. For example a teacher may say to find Waldo in an image: "scan for people from left to right, top to bottom, and stop when you find a guy in a red and white shirt." This would not work well as a programming language. How should this be compiled? How do you know if someone is a person, how do you know if they a…

Like I said, children can be just as pedantic as computers, especially when they’re trying.

Anyway, the language you describe wouldn’t work well as a tool, but not all programming languages are tools and are still worth making.

Using your example, this language could be a fun DSL for interacting with pictures. “Find all cars and make them red” I could imagine a backend tied to machine learning algorithms and a database query engine to make this possible. Parse with nlp, extract a query, form a plan with appropriate backends, execute, render output image. I dunno how useful that is, it would be fun and doable. You just gave me a great idea for my next senior capstone group. Thanks.

Re: Ask HN: How would a programming language look if designed by non-programmer

#84

Python is pretty close. I would pay good money to watch random people try to do something like get all the names from a CSV file in different programing languages. Have them on a zoom with a Senior Software Engineer. But said Senior Engineer is not allowed to write any code directly. In this hypothetical game show, I'd imagine most software engineers would pick python to try and teach remotely. Although it would be f…

>I would pay good money to watch random people try to do something like

Check out the answer threads in r/AdventOfCode, you'll not get the real-time sense of things, but you will see many different ways a problem gets solved in many languages.

Re: Ask HN: How would a programming language look if designed by non-programmer

#85

Ad hoc, it would be The Homer of programming languages if allowed to grow unfettered. Short of that, it would be a DSL oriented towards their particular needs. Possibly graphically oriented. Meaning something more like LabView or perhaps Excel, with a heavy visual component that lends itself well to people who are not experienced enough to visualize a complex abstract system or who need to communicate the graphical m…

> Ad hoc, it would be The Homer of programming languages if allowed to grow unfettered.

For those who don't get the reference: https://www.youtube.com/watch?v=WPc-VEqBPHI

Re: Ask HN: How would a programming language look if designed by non-programmer

#86

Ad hoc, it would be The Homer of programming languages if allowed to grow unfettered. Short of that, it would be a DSL oriented towards their particular needs. Possibly graphically oriented. Meaning something more like LabView or perhaps Excel, with a heavy visual component that lends itself well to people who are not experienced enough to visualize a complex abstract system or who need to communicate the graphical m…

> Ad hoc, it would be The Homer of programming languages if allowed to grow unfettered. For those who don't get the reference: https://www.youtube.com/watch?v=WPc-VEqBPHI

Thanks, I meant to link that but got distracted by work. Darn the work.

Re: Ask HN: How would a programming language look if designed by non-programmer

#88

Here's a simple one: You write out the requirements of the program in English and it spits out a program that implements it all.

"When someone says 'I want a programming language in which I need only say what I wish done,' give him a lollipop." —Alan Perlis

Re: Ask HN: How would a programming language look if designed by non-programmer

#89
post #69

It will be more like Pascal and Ada than something like C or Rust. I think Non-programmers would want programming to be more graphical, Diagram Dataflow and Graph-like with the help of "script" / functions describing actions. Something like the how current Game Engine are structured. May be Game Engine should be programming engine.

I think it would only be like Pascal or Ada on the surface. They both have too consistent of a model to be designed by a non-programmer.

Pascal, for instance, is more like Scheme: Reduce a procedural language to its core concepts and build on top of that. No non-expert would design something meant to used to compositionally like that, it requires a particular mental model they'd lack.

Ada had an advanced (especially for when it was developed and for a procedural language) type system, a comprehensive module system, generics, a task system, and protected objects (thread safe objects) from the start. All of those are things you'd have to recognize a need for and how they would be used which a non-expert would likely not come up with (though an expert may come up with as an answer to a non-expert's requirements).

Probably the only thing coming from Ada that a non-developer may think of (and they'd be brilliant for it) would be the ability to use an arbitrary range for indexing into arrays, including arbitrary discrete types (I actually hate that no mainstream language permits this). They might also come up with ranged types like being able to specify Alphabet as 'a' to 'z' (or 'A' to 'Z').

Re: Ask HN: How would a programming language look if designed by non-programmer

#90

Earlier quoted context omitted.

Just because a teacher can describe steps, that doesn't mean that it would be easy to make a computer do it. For example a teacher may say to find Waldo in an image: "scan for people from left to right, top to bottom, and stop when you find a guy in a red and white shirt." This would not work well as a programming language. How should this be compiled? How do you know if someone is a person, how do you know if they a…

Like I said, children can be just as pedantic as computers, especially when they’re trying. Anyway, the language you describe wouldn’t work well as a tool, but not all programming languages are tools and are still worth making. Using your example, this language could be a fun DSL for interacting with pictures. “Find all cars and make them red” I could imagine a backend tied to machine learning algorithms and a databa…

>Like I said, children can be just as pedantic as computers, especially when they’re trying.

Yes, but what are the chances that they make their new language that is not influenced by any other programming related knowledge to be specified at the right abstraction level using abstractions that are easy to implement? A language that they come up with is not going to be good. Similarly if you were to ask a non engineer to design you an airplane, it wouldn't be a good design. Experts are always going to be able to do a better job than those with less knowledge. I personally do not even think a kid is going to come up with some revolutionary concept that should be included into a language designed by experts.

Post reply on HN