Hacker News new | past | comments | ask | show | jobs | submit login

> One can create new languages fit for the purpose of a given class of problems and thus reducing size of codebase 10 to 100 fold

interesting, thank you for sharing.

Could I transpose your thought into:

--

Solutions (or large scale programs), should not be written in a general purpose language.

Instead, there should be core domain language (solution DSL) developed (using a general purpose language) and then the solution should be developed using the solution DSL.

?




Here's another unpopular opinion: Not much of the value of a DSL is in the syntax.

That is, I'm trying to write a program to do X. In, say, C++, I create data structures and functions as building blocks to write the higher-level functionality of the program. That's my "DSL" - just classes (structures and functions).

In Lisp, I can go further. In creating a DSL, I can not only create function (and, through functions, data structures), but I can also create syntax. This may let me write less code, and may make the code I write clearer.

My assertion is that, while that's nice, most of the DSL is actually the functions and data structures. The syntax is sugar - say, maybe 10% of the benefit, but not more.


> My assertion is that, while that's nice, most of the DSL is actually the functions and data structures. The syntax is sugar - say, maybe 10% of the benefit, but not more.

I don’t know, thinking of some DSL’s like HTML or SQL, syntax seems to be a really big part it.


It isn't immediately obvious that it is, to me. Could you expand on that?

For example, what works for html is basically the dom (data structure) and its functionality (the functions). There are others ways of creating and working with those than the specific html syntax. For example, haml. Or you might say, jsx, or elm,is also such a syntax for the same data structures.

These other approaches work perfectly fine, too.


Touché. I understand better what your saying. But even though the syntax changes, we always have some specialized syntax for using it. But it does make it seem like the data is more important since that is what stays the same.


Most constructs in most languages are syntactic sugar + varying degrees of enforcing constraints. The core you need to e.g an object oriented system or first order functions or any other higher level construct is tiny. You can do closures in C for example (done it). But it gets ugly and unreadable and hard to follow.

Syntax matters hugely in making the expression of an idea concise and readable.

Blocks in Ruby (or Smalltalk..) for example are pretty much just syntactic sugar over closures, are just syntactic sugar over functions, but both makes a substantial difference in ease of use, which again affects how people tend to think about problems.

E.g we are much more sparing with closure like constructs in C, even though nothing prevents it, because it is tedious.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: