plaidgroup / plaid-lang

The Plaid Programming Language Tools
11 stars 1 forks source link

Convert Java booleans to Plaid booleans #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently Plaid booleans are represented as states in Boolean.plaid.  If we 
call a method that returns 
a Java boolean in our current while structure, it gets wrapped up as a 
PlaidJavaObject where the 
while structure expects a Plaid boolean.  We should unify these two 
representations.

Original issue reported on code.google.com by mhahn...@gmail.com on 18 May 2010 at 10:02

GoogleCodeExporter commented 9 years ago
I've added a method getPlaidObjectRep() to PlaidJavaMethodMap that converts any 
special Java values to their 
correct Plaid representation.  For now, the only values deemed "special" are 
booleans because we have no built-
in way to deal with them so they must be converted to their corresponding 
values in stdlib.

I tried a more elegant solution by adding a case for Java booleans to the 
patterns in Boolean.plaid in stdlib, but I 
ran into the same problem of not having any way to check whether the values 
were true or false.

Original comment by mhahn...@gmail.com on 19 May 2010 at 3:31

GoogleCodeExporter commented 9 years ago
I've added a method getPlaidObjectRep() to PlaidJavaMethodMap that converts any 
special Java values to their 
correct Plaid representation.  For now, the only values deemed "special" are 
booleans because we have no built-
in way to deal with them so they must be converted to their corresponding 
values in stdlib.

I tried a more elegant solution by adding a case for Java booleans to the 
patterns in Boolean.plaid in stdlib, but I 
ran into the same problem of not having any way to check whether the values 
were true or false.

Original comment by mhahn...@gmail.com on 19 May 2010 at 3:31