Live data from Hacker News

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

news.ycombinator.com

41–50 of 132 posts

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

#41

Perhaps I'm grumpy, but questions like this irk me. A programming language designed by a non-programmer would simply not work. It would have non-logical magic the non-programmer expects us programmers to create, things like the "do what I mean" function. One would have to seek out someone with a nearly programming language formality in their logical thinking, such as a mathematician, or linguist. Whatever such a non-…

> 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 finding and exploiting holes in logic.

- doctors debug and apply patches to complex, opaque, nonlinear systems. As a programmer, I can relate.

- teachers break down complex subjects into small digestible chunks that when consumed, produce a desired result. You have to be very literal and precise when giving children instructions; they tend to do what you say, not what you mean.

These three professions are removed from coding but it’s not hard to find analogues to programming in what they do. I think with the right language these people could integrate coding into their work the same way they do writing. And in many cases, with Excel they are. Show me a teacher who doesn’t use a spreadsheet or similar tool to manage their class. You can’t!

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

#42
post #5

50 years ago, these people were quite common. There were only mathematicians and engineers, but programmers didn't exist yet. The good: Excel, Dataflow Diagrams (commonly found in game, music and arts), SQL, Declarative Dataflow Paradigms in general. Mutablity is counterintuitively counterintuitive if you don't have a model of the underlying execution system. The weird: Prolog, APL, languages done by mathematicians a…

I'm of the age that I also consider 50 years ago to be the dawn of computing. Turns out it's closer to 75. :-)

It has been said that non-programmers used to catch on to APL quite quickly back in the day. Faster than regular programming languages in fact. The designers, Ken Iverson, didn't even design the language to be run on computers but rather as a mathematical notation.

Someone else mentioned Excel, and that is an example of data-oriented programming. It actually hides the code and displays the data, which is why most programmers hate it. It's not the data that is important when doing development, but the code.

Array oriented languages like APL and R allows you to work with data like Excel, but you work with the code, not the numbers. I'd argue that once you learn more about programming, one tends to want to work with the code rather than just looking at data.

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

#43
I'm not sure I'd agree that OOP is beautiful. It's just nouns with verbs inside, which doesn't seem particularly better than nouns with verbs outside.

I definitely would not agree that it "enables normal people to model complex systems". Not once in my entire career have I seen a business person provide anything of any value to a software's architecture. Even thinking they could is so strange to me I don't even know where to start to unpack it. Software architecture is so different to the processes it models, it would be nonsensical to even have them try. Like asking someone illiterate to organize a book.

Wasn't that whole concept just marketing by Sun to sell Java and OOP to the world? These days everyone using Java uses so much spring and xml I'm not sure it even makes sense to call it OOP anymore. It's more like AOP+DI with a little OOP thrown in.

If anything, I'd think trying to have a customer design your objects would result in a tremendous mess. The nouns and verbs they would think of are going to be extremely limiting once you add in the common needs like caching, parallelism, network boundaries, async processing, auth, logging, monitoring, protocol formatting, API versioning, etc. The hard parts we need help on from business people are understanding the business models completely, not where X function should live and if it should be in a class or not. And even if they did have strong opinions about that, logic is actually much easier to test when it's not in OOP, and I'd rather have automated unit tests.

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

#44
post #5

50 years ago, these people were quite common. There were only mathematicians and engineers, but programmers didn't exist yet. The good: Excel, Dataflow Diagrams (commonly found in game, music and arts), SQL, Declarative Dataflow Paradigms in general. Mutablity is counterintuitively counterintuitive if you don't have a model of the underlying execution system. The weird: Prolog, APL, languages done by mathematicians a…

I'm struggling to think of an aesthetic reason why SQL would be "good" yet R, "ugly".

SQL made relational programming possible, when computer were too slow to do declarative programming. The modern aproach would be something more highlevel/declarative like Datalog, but given the context SQL made a good tradeoff in terms of programmer control and declarativity.

R is ugly because it encourages users to use it wrong. For loops are slow as a snail, but are what everybody uses and teaches, while the proper/fast way to wrangle data, with higher order functions like map, is hidden behind idiosyncratic names and obscure APIs.

Even the creator of R considered making it a language instead of the scheme library that it started iut as, as a mistake.

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

#45

I'm not sure I'd agree that OOP is beautiful. It's just nouns with verbs inside, which doesn't seem particularly better than nouns with verbs outside. I definitely would not agree that it "enables normal people to model complex systems". Not once in my entire career have I seen a business person provide anything of any value to a software's architecture. Even thinking they could is so strange to me I don't even know…

Imma clarify:

By "normal" here I meant that you don't have to be some kind of genius in order to model real world using OOP.

And we have shitton of programmers that everyday model real world complexities using OOP

>Wasn't that whole concept just marketing by Sun to sell Java and OOP to the world? These days everyone using Java uses so much spring and xml I'm not sure it even makes sense to call it OOP anymore. It's more like AOP+DI with a little OOP thrown in.

Well, on the other hand C# doesn't have all of that XML fetish/Annotation Oriented Programming (@Transactional :P)/Aspect Oriented Programming magic, so it's not like there's only one interpretation and implementation of OOP and it must be Java's

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

#46
post #16
post #15

LaTeX I love the output it gives, but the language is quite horrible.

Do you really think Donald Knuth [1] and Leslie Lamport [2] are non-programmers? [1] https://en.wikipedia.org/wiki/Donald_Knuth [2] https://en.wikipedia.org/wiki/Leslie_Lamport

Yes. Yes I do. Dr. Knuth, anyway.

He's not really a programmer, so much as he is a scientist first and foremost. When I think of a "programmer", I think of John Carmack and Tim Sweeney. When I think of computer scientist, I think of Donald Knuth.

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

#47
post #13
post #5

50 years ago, these people were quite common. There were only mathematicians and engineers, but programmers didn't exist yet. The good: Excel, Dataflow Diagrams (commonly found in game, music and arts), SQL, Declarative Dataflow Paradigms in general. Mutablity is counterintuitively counterintuitive if you don't have a model of the underlying execution system. The weird: Prolog, APL, languages done by mathematicians a…

Despite constantly reading on this website that R is bad or wrong, I somehow manage to get all of my data work done quicker and with fewer headaches than excel, sas, or Python.

From memory, R is quite slow, and has syntax I found really ugly. Dots as part of names (my.variable), $ for member access, operators wrapped in % for pointwise operations, eg %*% for pointwise multiplication.

These probably shouldn’t matter but did for me. FWIW the statistical offering was fantastic.

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

#48
post #42
post #5

50 years ago, these people were quite common. There were only mathematicians and engineers, but programmers didn't exist yet. The good: Excel, Dataflow Diagrams (commonly found in game, music and arts), SQL, Declarative Dataflow Paradigms in general. Mutablity is counterintuitively counterintuitive if you don't have a model of the underlying execution system. The weird: Prolog, APL, languages done by mathematicians a…

I'm of the age that I also consider 50 years ago to be the dawn of computing. Turns out it's closer to 75. :-) It has been said that non-programmers used to catch on to APL quite quickly back in the day. Faster than regular programming languages in fact. The designers, Ken Iverson, didn't even design the language to be run on computers but rather as a mathematical notation. Someone else mentioned Excel, and that is a…

> one tends to want to work with the code rather than just looking at data

I've observed the opposite trend. The more senior people get the more they care about the data and less about the code.

Programming = Datastructures + Algorithms

But it's the Data-structures/-models that dictate the algorithms and it's the domain and data therein that dictates the model.

Most companies could survive their code being lost. None would survive loosing all their customer data.

Functional programming is all about data, react is about data, machine learning is about data, google and facebook are about data.

Code is an incidental means to an end, in 90% of all cases, except flight software and games maybe, but even there the trend is towards data driven ECS-Systems and "collect all data for a timestep, and execute your flight control program to compute all actuator outputs in one go"-approaches.

And observability is one of THE hot topics in the biz right now.

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

#49
post #3

Go look at some of the programming languages from many years ago, when most of the good stuff we like hadn't been thought of. A good starting point is the video, 50 in 50, by Guy Steele and Richard Gabriel. It reviews 50 programming languages from the first 50 years of computing.

I found that vid on vimeo but the quality is awful. Do you know of any better source of this talk?

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

#50
Well, I'm not a programmer/have never worked with computers for a living and have no formal education in computing, and I have recently been designing my own language as a learning/fun exercise. It looks a lot like forth and ksh had a baby that grew up to become a state machine.
Post reply on HN