• 0 Posts
  • 9 Comments
Joined 1 year ago
cake
Cake day: July 4th, 2023

help-circle

  • Coming from some one who used 4 different languages (C#, C++, Python, and G’MIC), I just feel more comfortable when there’s a explicit end blocks, which is why I don’t like Python. Of all of those languages, only Python does not make that explicit end block which is off-putting in my opinion, and there isn’t any other options with the similar role to Python.




  • Chances are there’s probably something similar to dictionary in Python in your languages or at least it’s a import/#include away. Although I don’t use general programming languages at all, in my used language (G’MIC), I do something like dict$var=input where $var is a defined variable, and this way I can access input by doing ${dict$var} and that’s similar to Python dictionary. In C++, there’s hash table implementation out there via github. That being said, there are sometimes when you don’t need a hashtable dependent on the hashmap, and sometimes, it’s just as simple as basic mathematics to access data.





  • Here’s my opinion, a well-developed DSL could even be arguably more flexible than say Python even with existing libraries on their specific domains. So, if one is just limited to domains, they may be very well be preferable to general languages.

    I have coded in C#, Python, C++, and currently nearly everyday, G’MIC. Which one of those are a DSL? The last one. What it is? It’s a Domain-Specific Language that has been geared toward raster graphics image processing. Why do I use it? Looking at the stack-based processing, commands, built-in mathematical functions. It seems that it has a lot more things that are built-in than say Pillow library for Python and other things. And I only do create images with code, so I am happy with this, and I even did things like Python itertools combinatorics with more things like rank2list/list2rank variation of those combinatorics which aren’t image processing by themselves, but can aid to it.

    If I feel that it is way too limited for that Domain, then I wouldn’t use it. DSLs are only good if the other options are much more difficult to build with and their flexibility are often enough to entice their audience which is one with limited use cases. Of course, generic languages are usually better even than most DSL even within their domains because of wider support, and wider audience. More DSLs would be better than generics given enough time and support for their domains in my opinion.