Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you need a debugger from sed, aren't you now using the wrong tool for the job? We have lots of mature, debuggable languages to process text...


I certainly do. This is meant just as a toy, and way to learn Rust, which is what I've written this in. If I need to actually achieve something, I use python or haskell.

However sed is perfect if you have spare time and want to write basic programs in unnecessarily complex way for fun.


A long time ago I wrote a reformatting utility for a client in sed, because my manager didn't want to have to support the utility and Anderson claimed it couldn't be done in any language. The Androids whined and then they rewrote it in C++, which they had to support.


> However sed is perfect if you have spare time and want to write basic programs in unnecessarily complex way for fun.

There are certain things that are difficult to do in sed, but are much easier to do in ed. Though ed doesn't have the branch command and labels, having essentially random access throughout the file makes up for it.


> We have lots of mature, debuggable languages to process text...

You mean like sed? Sed was written in the 70s and has been in mission critical stuff for decades on many platforms. What are you recommending that is more mature than that?


Sed does not have a debugger that is 50 years old. The author was not saying that sed is a bad tool; he's saying it doesn't have a debugger. If there is a desire to have a debugger for the tool, that has existed for 50 years without having one, perhaps the tool is not being used in the way it has been used for the last 50 years. This would seem to make the argument that the tool has been tried and tested less relevant.



COBOL was written in the 60s and has been in mission critical stuff for decades. Neither of those factors means it's the right tool for the job now.

The things I'm recommending that are more mature are Go, Python, D, Rust, or any other language that is more verbose and maintainable than regular expressions. Anything with a full debugger, IDE support, and useful error messages is a better choice.


Except COBOL often is the right answer for text processing now, meets all your criteria (debugger, IDE, maintainable, etc) and far more mature than Go, Python, Rust or D (really...D?).


COBOL is the wrong tool for any new job now because hardly anyone knows it.


Which could be said about any newly fashionable language. Or any niche language. And in the case of COBOL, it's not even true. Here's a little hint: just because you don't know any COBOL programmers, doesn't mean they don't exist. My own company has a couple of hundred, and we have an outsourcing partner that has a several thousand. We are not unique.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: