| ▲ | zahlman 6 months ago | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> is faster than This is incoherent no matter what two programming languages you are talking about. It's like trying to say the road is fast, as opposed to the car. But in practice, for anything where performance matters, Perl and Python are effectively just convenient ways to wrap a C inner loop anyway. I don't just mean gluing to some third-party library, either. I mean something inside the interpreter. Once you've built the state machine for the regex, the language bytecode doesn't matter any more. Which is why it's dozens of times slower in both Python and Perl to run a do-nothing for loop than to iterate through a string with a dummy regex, or to use built-ins to search for a character, etc. (Or to create the string in the first place.) > it is great for string manipulation, which again, is not a matter of opinion This is incoherent no matter what programming language you are talking about. Of course it's a matter of opinion. Other people aren't going to like the same syntax you do. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ▲ | johnisgood 6 months ago | parent [-] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
> This is incoherent no matter what two programming languages you are talking about. Yet everyone talks about performance when it comes to programming languages. Why? And what does coherence have anything to do with it? Plus I explained what I meant by that, there is a huge difference in the startup time of Perl and Python, for one, and you can check benchmarks. The implementation of the two languages are not identical. If they are not identical, there must be a difference in performance one way or another, I assume. > This is incoherent no matter what programming language you are talking about. Of course it's a matter of opinion. Other people aren't going to like the same syntax you do. I do not think anyone is going to argue that Brainfuck was made with easy string manipulation in mind, or Forth. The point is that Perl helps you manipulate strings with relative ease. Assuming you know the language, yeah. In fact, please read other comments, because I have already said this: "For the 100th time, I was responding to "[...] python and it is easy to do string manipulation with.".". It is easy to do so in Python, but even easier (and faster) to do on Perl. In both cases there is an assumption of knowing the language, and I thought that goes without saying. I said nothing about liking the syntax or whatever you are trying to read into it. It is easy to do string manipulation, regardless of your like or dislike of the syntax. Thus, not an opinion. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||