• entries
359
237
• views
188740

168 views

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{	return(   		(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.

There are no comments to display.