A Basic Challenge

Recently, I came across this project which turns C++ into BASIC. How close can Perl do?

I recall reading somewhere that Perl has the ability to vastly alter its syntax. Is Perl going to be bested by C++?


I see https://metacpan.org/pod/Language::Basic and https://metacpan.org/pod/Inline::Basic on CPAN already. I'm sure that someone could implement either a source filter or something else on top of those, but in essence, its been done long ago :-)

I thought you might say that, and IMO, that's more preprocessor than C++ anyway. What would be cool would be implementing a DSL or even a p6 grammar that does it directly.

Hullo all,

I don't generally write in Perl, so in many ways I don't belong here. But I was made aware of this challenge, and since I'm the one guilty of the C++ stuff, I thought I'd introduce myself. Hi there!

Are you sure you want to show that Perl can be an even weirder language than C++ is?

I understand the spirit. I did this in part because I was amazingly bored, and in part because an ex-colleague complained about having inherited code that reminded him of BASIC. The combination of the two made horns grow on my forehead, and they weren't the BSD type.

Well, my best wishes, should you choose to pursue this. My example can no doubt be improved upon.


P.S. As a friendly advice, I don't think you should add your achievements in this to your CV. I sure won't put my achievements on mine.

Leave a comment

About rockyb

user-pic I blog about Perl.