Comments (6)
@adrian-herscu I'm personally strongly against that kind of DSL's. I believe that they only make code less readable. I'm using Ruby a lot and I really hate their DSL's. Very often I simply can't understand what the code does and have no idea where to look for documentation. So, I'm in favor of a very strict and specific syntax. No sugar, no DSLs, etc. See aa56f21
from eo.
@yegor256 I believe there should be space for DSLs in a general programming language. Otherwise, boilerplate code will probably be necessary for some particular tasks.
In an attempt to support my point of view, I want to point out that the README already contains some code that could be considered as beloning to a DSL. Namely, the printf
function takes a string in which %
is considered special character. If the argument to printf
is not a DSL, I don't know what is :)
from eo.
As I understand, every such custom DSL uses the idea of using compile-time analysis, mainly in IDE, to verify a statement in this DSL. Also, a question about DSL is not always a question about syntax extensibility, e.g. Scala-based DSLs.
from eo.
Agree. Languages with too much "magic" give me the creeps (e.g. Elixir, Ruby frameworks)
from eo.
@yegor256 I believe there should be space for DSLs in a general programming language. Otherwise, boilerplate code will probably be necessary for some particular tasks.
In an attempt to support my point of view, I want to point out that the README already contains some code that could be considered as beloning to a DSL. Namely, the
printf
function takes a string in which%
is considered special character. If the argument toprintf
is not a DSL, I don't know what is :)
printf
's %
is not a language feature. You can always make your own parser for that using EO and no DSL in context of the language would appear
from eo.
printf
's%
is not a language feature. You can always make your own parser for that using EO and no DSL in context of the language would appear
You're reviving a very old thread!
In any case, I believe what I meant is that printf
's argument has its own domain specific syntax. Even though you put quotes around the argument, it still has to follow a domain specific syntax and isn't free form. AFAIK, part the definition of a DSL is that it has to have a grammar, no matter whether the parsing occurs at runtime or compile time.
I agree with you that it isn't a language feature, but a DSL doesn't have to be a language feature, all it needs to do is be its own language IIUC.
It appears I wanted to use this point to support the view that DSLs can help simplify code, which I still believe is sound. For example, printf
%
, regexes or numpy's einsum mini-language (which, IIUC, are all domain specific languages) can consolidate code and make it easier to read.
from eo.
Related Issues (20)
- eo-runtime doesn't build when offline (no Internet connection) HOT 2
- Unsuitable types for + operation (xs:string, xs:integer). HOT 8
- Attribute @line is absent HOT 3
- Object Name Already In Use HOT 10
- `ResolveMojo` should not be part of `assemble` cycle HOT 11
- EOLANG paper has incorrect definitions HOT 1
- `eoc phi` translates `int.eo` in a wrong way HOT 4
- Java 8 is not supported HOT 9
- "good-first-task" -> "good first issue" HOT 3
- Can't `unphi` normalized programs HOT 18
- `eoc unphi` produces untestable programs HOT 12
- Atom `go` not needed HOT 8
- Some hash wasn't found when link Hello World HOT 8
- It's unclear where problematic object is used HOT 1
- How do you check that programs in the README work? HOT 2
- How to run eo:phi and eo:unphi? HOT 2
- `tuple` too complex and breaks LSP HOT 37
- Can't convert EO example in the README to PHI HOT 5
- Make XSD as powerful and as restrictive as possible HOT 1
- `PullMojo` and `ResolveMojo` are not proxy-aware HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eo.