Name-based type inferrence ========================== Example: names bool found Item item List list string name int i j k end # Both `name` and identifiers that end with `Name` # could be mapped using name-based type inferrence. func process_item itemName code found <- false # `itemList` is assumed to be a List of Items for item in itemList if item.name == itemName found <- true end end process_item itemName create_new=found end Downsides: * Causes longer identifiers names, which could make the code harder to read in some cases. Syntax: # Like this? names bool found List list end # Or, like this? names found: bool list: List end # Or, in a separate `names.lst` file? # (Maybe some other name, because I think that filename is already # in use by Liero (an old game) and perhaps other software; # it's just too "common"-ish) "This and that typing" ---------------------- Trivial example, to show the point: func do_stuff types Item inp Thing outp code outpList <- new for inp in get_items inpName <- inp.name skip if is_skipped_name inpName outp <- convert inp add outpList outp end end Problem: Extra lookups / ambuigity ---------------------------------- "someList" "someString" List is a generic type. String is not. But this might not be known at the time when the particular source file is being parsed.