Jump to content
  • Advertisement
  • entries
  • comments
  • views

Tangent: Adverbs

Sign in to follow this  


It took a week of dirty dirty hacks, but I got that not example working from the last post. I'm sure I broke 2-3 things somewhere, and it runs like a dog, but it works. Oh, and it's far more ugly and verbose than I'd like. The final working test code:

public static generic(Exists P)
not( P infix -> bool predicate ) => P infix -> bool{

(P arg) infix => bool{
return( not (predicate arg) );

public static main()=>void{
print (5 not equals 4);

Instead of defining equals and not equals we define not to take any binary predicate and modify it to be the inverse.

More work will be needed to make the generic referencing more robust, and some stuff to make the language more flexible about where generics can be used in declarations.

But this is the general idea behind some of the language features. Expressions behave more like linguistic expressions, where bits can be combined together, and modified in pieces rather than mathematical expressions which so poorly describe the problems faced by modern programmers.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!