Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Modules to reduce syntax?

by ikegami (Patriarch)
on Dec 22, 2021 at 20:04 UTC ( [id://11139843]=note: print w/replies, xml ) Need Help??


in reply to Modules to reduce syntax?

I saw semi::semicolons, so I figured the rest of the language could be changed some how as well?

Semi::Semicolons take a non-Perl program, translates it to Perl, then runs that. Feel free to create your own programming language and translator just like Semi::Semicolons did. Then, all you need is this:

package MyLang; use Filter::Simple; sub translate { my $mylang_code = shift; ... return $perl_code; } FILTER { $_ = translate($_) } 1

Note that ref[foo] already means something in Perl. (It means the same thing as ref( [ foo() ] ).) So you're new language is going to have to change that too.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11139843]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-20 03:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found