are List/Map Nodes meant to be used?

Monkey Forums/Monkey Programming/are List/Map Nodes meant to be used?

Skn3(Posted 2012) [#1]
So are we supposed to use the List/Map Node classes?

If so would it be possible to alter the naming convention as currently I would have to add something like this:
Alias ListNode = monkey.list.Node


Without this monkey will complain about duplicate identifier Node in Map and List.

Should this be in the bug forum?


ziggy(Posted 2012) [#2]
use Alias at the top of your code: Alias Node = list.Node to solve the naming clash


Skn3(Posted 2012) [#3]
Added it into my header.

It seems like it needs an official tweak though as surely it is broken if I can't use without alias first?


ziggy(Posted 2012) [#4]
@skn3: I don't think so, it would be nice if both implement the same INode interface, so you can use just the interface to use any of them whenever. Other than that, you can always full-qualify them, or use alias if you really need to.


Skn3(Posted 2012) [#5]
Yeah both using a common INode would be good! hmm is this wrong?
Import monkey.list
Import monkey.map

Function Main()
	Local blah:monkey.list.Node
End


I am unable to qualify the node like this?


AdamRedwoods(Posted 2012) [#6]
Local blah:list.Node



ziggy(Posted 2012) [#7]
only module name is allowed, not full module "path"


Skn3(Posted 2012) [#8]
Ah cool thanks for that.