Live data from Hacker News

Little languages are the future of programming

chreke.com

81–90 of 216 posts

Re: Little languages are the future of programming

#82

People have been making this argument since the 80s and possibly even earlier. My experience is often the opposite. Little languages are usually far, far harder than (mis-)using "big" languages for small tasks. The problem is that your DSL has to be understood by other people, including future you. Programming tasks are vast, combinatorially explosive state spaces full of weird potential interactions between features…

I only have only one experience to share. Back in mid 90s, was tasked with developing a webserver that provided targeted advertising. A requirement was providing the marketing team an accessible mechanism for defining rules. Basic stuff like encoding a marketing/ad-sale team rule such as "show ad of truck if user is male, at some age group". A little scripting language was developed, nothing fancier than conditional…

Well, go with a language that makes DSL a peace of cake, like Ruby.

Re: Little languages are the future of programming

#83
post #43

Earlier quoted context omitted.

And then there's the issue of the language itself: - can you even design it properly? - is it tested? - is it debuggable? - how does it integrate with the rest of your program(s)? with the rest of your system(s)? - what's the performance, and does it matter? - is it documented? - who is going to maintain it 1 year from now? 5 years from now?

Not to mention the human tendencies to align with certain ideals. For example, does it use 1-based indexing like Lua and Julia? If so i just can't bring myself to use it.

I'm not extremely familiarized with Julia, but it seems to me that it would let you switch to 0-based indexing as an option.

Re: Little languages are the future of programming

#84
post #10

I don't think it's so much "little" languages (commonly DSL) that matter. It's more the jumps in expressivity. You don't use a full on Turing-complete language when you need to match strings written in a regular language. Instead, we write the language we want as a regexp, and then use a regexp engine to match it. I agree with much of the problems listed in the article. The author even manages to stumble onto some of…

What's a “total language”?

It's a programming language where every written program terminates.

As a corollary, such languages can't be Turing complete, since universal Turing machines can represent programs which don't terminate.

[1] https://en.wikipedia.org/wiki/Total_functional_programming

Re: Little languages are the future of programming

#85

People have been making this argument since the 80s and possibly even earlier. My experience is often the opposite. Little languages are usually far, far harder than (mis-)using "big" languages for small tasks. The problem is that your DSL has to be understood by other people, including future you. Programming tasks are vast, combinatorially explosive state spaces full of weird potential interactions between features…

Indeed. That's why we have languages with functions now, because people didn't want to manually do a register dance in assembly. That's why we have name spaces, because naming conventions only take you so far. That's why we have map and filter (or equivalent) because that's what most loops are doing anyway. Generation after generation, we discover that we all use common abstractions. We name them design patterns, the…

> Small languages either become big, or are replaced by things that are big, for the same reason most people prefer a car to a horse to go shopping.

So why are shell languages still around? Why are they not replaced by C#, C++, Java or another big (=general purpose) language?

I find your horse->car comparison more akin to the sh->bash->zsh transition. Zsh is not as small as sh, but still it is in the small league is you ask me.

Small does not mean w/o functions, without NS, without map/filter: it means "not general purpose".

Re: Little languages are the future of programming

#86
post #12

The size of the language is a red herring. You really just want programs that are well structured, which can be greatly helped by choosing a "perfect language" for each task, but often helped just as well by choosing (or creating) a great library to express the business logic.

I think "little" refers to the domain rather than other metrics of language size

Re: Little languages are the future of programming

#88

People have been making this argument since the 80s and possibly even earlier. My experience is often the opposite. Little languages are usually far, far harder than (mis-)using "big" languages for small tasks. The problem is that your DSL has to be understood by other people, including future you. Programming tasks are vast, combinatorially explosive state spaces full of weird potential interactions between features…

There are some modern success stories like LINQ or JSX.

JSX isn’t a separate language though. It’s recursively inline html/js.

Re: Little languages are the future of programming

#89
post #43

Earlier quoted context omitted.

Not to mention the human tendencies to align with certain ideals. For example, does it use 1-based indexing like Lua and Julia? If so i just can't bring myself to use it.

I'm not extremely familiarized with Julia, but it seems to me that it would let you switch to 0-based indexing as an option.

The notions first index, current index, previous index, next index and last index and each index are all invariant under shifts of the index set... yet this is the hill people choose to die on.

Re: Little languages are the future of programming

#90
post #85

Earlier quoted context omitted.

Indeed. That's why we have languages with functions now, because people didn't want to manually do a register dance in assembly. That's why we have name spaces, because naming conventions only take you so far. That's why we have map and filter (or equivalent) because that's what most loops are doing anyway. Generation after generation, we discover that we all use common abstractions. We name them design patterns, the…

> Small languages either become big, or are replaced by things that are big, for the same reason most people prefer a car to a horse to go shopping. So why are shell languages still around? Why are they not replaced by C#, C++, Java or another big (=general purpose) language? I find your horse->car comparison more akin to the sh->bash->zsh transition. Zsh is not as small as sh, but still it is in the small league is…

>So why are shell languages still around?

Are they? I don't use them more than once a year

Post reply on HN