3 ms·
I know C and implementing a new scripting language for sure doesn't sound easier than using an existing one
by bauerd 7y ago
I know C and implementing a new scripting language for sure doesn't sound easier than using an existing one
- codr7 7y agoDid you ever write an arithmetic evaluator? A calculator essentially? Or any other kind of evaluator? A text template engine perhaps? They all have plenty in common and exist along a continuum of complexity that includes scripting languages and goes all the way to general purpose.
- throwaway_pdp09 7y agoI've written all of these and I agree with the GP that it's easier to use an existing one. Why recreate someone else's work when you can just use it.
- MaxBarraclough 7y ago> exist along a continuum of complexity Isn't that the point? Building a serious scripting language is a huge project. It's far more ambitious than writing a simple text-based calculator. If you want to build a scripting language worth actually adopting, it's going to have to be far better than Python. That's a very high bar. The same applies for everything in technology. You could try to write your own OS rather than use an existing one, but it's almost certainly a terrible idea.
- brianush1 7y agoWell, the whole idea is to keep it simple. Look at Lua for a language that can be implemented in a weekend and is still a very serious language. Admittedly, you would probably end up spending a lot of time in the design phase if you were to create your own language, but once you have that, if it truly is a simple language, the implementation is not a problem.
- codr7 7y agoWorth adopting by who? I once replaced a convoluted pricerule framework based on fixed options in a booking system with a simple evaluator that exposed variables for number of days, number of guests etc. That was very much worth adopting for that specific use case. Your line of arguing always assumes that any solution has to cover all bases, which is just not true when you're solving a specific problem. And no, the same doesn't apply for everything in technology. The continuum for operating systems starts at a much higher level of effort and cost of maintenance. Nothing is black or white.