Live data from Hacker News

Programming language notation is a barrier to entry

blog.sigplan.org

51–60 of 191 posts

Re: Programming language notation is a barrier to entry

#51

This post touches upon a subject that I really wish was more adopted: having alternate syntaxes for the sake of _clarity_. Syntax "bread" to the syntax sugar. For example, regular expressions and date strings can be written in a nice and compact form, but how nice would it be write `Not(DigitalCharacter)` instead of `\D`? Or `TwoDigitYear` and `FourDigitYear` instead of `y` and `Y`. The same convenience exists in sho…

I think this is what Perl tried (see: TMTOWTDI) What ends up happening is in order to maintain other people’s code it forces you to learn all the different syntaxes and becomes a burden.

Re: Programming language notation is a barrier to entry

#52
post #15

Earlier quoted context omitted.

Notation is a tool for thought. You want to optimize it for the problem you're solving. Not that PL notation is optimal, but being beginner-friendly is about the last thing one should care about.

Except in a programming language designed for learning programming. Ideally, we would have a good educational language with a clear path mapping the notation from that language to more common notation used in programming languages designed for computer science, software engineering, or software development.

I think Python filled that niche.

It's not perfect by any means, but it's better than what people used before (Basic, Pascal).

Anyway, if you want an actually good option, Logo is still around. But it does not let you create anything really interesting, so you better get through it fast or your courses will become boring.

Re: Programming language notation is a barrier to entry

#53

Anecdote, my first programming language was Ruby and it was super confusing without the braces. I then found JavaScript and then it clicked because of the braces (though now I have no problem doing Ruby and Python or Rust). and I am not the only one saying this.

I actually had the reverse. Started in PHP and C# before I went into Ruby. And the Ruby notation just clicked a lot better for me.

I later went back to bracked notation and never really had a problem anymore. Having each bracket combination be coloured uniquely helps a lot too.

Re: Programming language notation is a barrier to entry

#55
Sure, notation is a barrier to entry. I am not sure something should be done about it, though. After one week of experience in your first programming language it is no longer a barrier and perhaps the thing that has been introduced to avoid notation now is holding one back because of its verbosity....

If I may add a pet peeve of me, I would say that auto formatters and bad style guides are a barrier to entry. Some of the things out there seem to not have bothered to be actually adapted to the human visual system. Also, good formatting is a very difficult job to do automatically so the results are likely to be suboptimal. As a visually inclined person non-optimal formatting really disturbs me.

Re: Programming language notation is a barrier to entry

#56

Slightly off topic: Why do we need to explicitly cast at all? If the language is strongly typed the compiler should know whether the types are compatible and do it for you or refuse to compile. I suppose my point is that casting was a poorly chosen example because the obvious solution isn't to have a better notation but to have no notation at all and follow Python's lead with duck typing or functional languages and s…

I think casting is an important part of documenting and encoding intent. Especially in embedded systems.

Re: Programming language notation is a barrier to entry

#58
post #26

Earlier quoted context omitted.

> Anyone remember all the different ways music was represented as they grew up? What about guitar tabs? I remember simplified math as a kid. I don't remember different notations for math and music as a kid... Music was always sheet music, even when I learned classical guiter; Chord names were "procedures", at times spelled out, and sometimes only referenced. Guitar tabs exist, but were only for people who wanted to p…

Guitar tabs exist, but were only for people who wanted to play without taking the time to actually learn the craft This attitude really rubs me the wrong way. Tablature is absolutely ancient. It's been around for hundreds of years, and this glib dismissal is just the absolutely epitome of an elitist mindset.

I just added an edit: I wrote this, but this wasn't my mindset -- that was the mindset of every teacher and adult around me growing up, including those who couldn't read sheet music and used tablature to play.

(Yes, I did grow up in a culture highly inspired by older/east european ideals, where kids were welcome to do whatever they want such as learn the guitar, after they've finished their homework, practiced their piano lessons. And as long they're on a path that -- if kept -- would lead them to be on a professional level) I played classical guitar for a few years, but stopped because I just wanted to play popular music, and there were no teachers around who actually taught that who were accomplished enough to be considered worth the money by my parents (who had a very limited budget).

Re: Programming language notation is a barrier to entry

#59
post #2

Meh Notation in any field is a barrier to entry. See programmers takes on both math and music notation that are often posted here. The thing about notation that people sometimes don't think about is that it's used by many different types of people. Some things that would be convenient when notated implicitly make thinking about other things difficult.

Notation is a tool for thought. You want to optimize it for the problem you're solving. Not that PL notation is optimal, but being beginner-friendly is about the last thing one should care about.

> but being beginner-friendly is about the last thing one should care about.

Why is that? If our ideas are good, don't we want the most number of people to know them?

What if PL research isn't getting the population of people and ideas it desires? Look to organizations that have been around longer with even more inscrutable forms of knowledge, how well do they age and evolve?

I think there is a lot more at play here when it comes to optimizing for beginners. Imagine if we had metalanguages for conveying knowledge and that we could distill common subjects from 6 years -> 6 weeks -> 6 hours -> 6 minutes. Or tooling that allowed us to write in both the Simple English Wikpedia, the standard and at the expert level at the same time? Or refactored our writing so it was in the Inverted Pyramid [1], automatically generating tl;drs and keeping our long winded posts on track?

Wouldn't that be amazing.

[1] https://en.wikipedia.org/wiki/Inverted_pyramid_(journalism)

Re: Programming language notation is a barrier to entry

#60
post #14

Is this saying that a new language is the barrier to learning a new language?

I don't like the term "programming language" and your comment illustrates why. We would expect that an aspiring architect needs to learn a little bit of notation, and a lot about the tradeoffs and constraints of making a building. We should expect that programmers learn a little bit of notation, and a lot about the tradeoffs and constraints of making software. Knowing your tools well is important, but not sufficient.…

I think I understand your point. Do you think that the "programming language" should sacrifice the usefulness of its syntax in order to appeal to beginners more?

There is also I think a difference between Architecture and software development in that an architect aims to design and plan with drawings and documents a building that in the end is distinct from them, whereas software development produces a set of documents that are synonymous with the software itself.

Post reply on HN