-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hashtables don't accept empty list as key. #5
Comments
Hmmm, this is interesting. An empty list is a Thanks |
Unfortunately, this is a limitation with the .NET implementation of hashtables... I could work around it, by creating some substitute for null but it seems hacky, and then you have differences in behavior between .NET and IronScheme which I try my best to avoid. I will think about it a bit more. |
In the meantime, I've been doing something like this:
You're right. It feels very hacky and I'm not happy with it. But I need this behaviour of a project. Do you maybe have a better idea? Great work, btw. |
That's about right. You could probably use If you really want to you can use macros to clean it up, but IMO it is too much effort in this case. Eg:
|
Will this be fixed or does...
...outweigh R6RS conformance? At the moment I use boilerplate code like above to create a special nil-record used in case of empty lists as keys. Its bothersome and fragile however, to maintain several product versions for different Scheme implementations. |
I was thinking of building it into IronScheme libraries, but need to investigate. I think some hashtable procedure(s) are still done in C# which makes it tricky. |
@christoff-buerger Should be fixed in last commit, let me know if you pick up issues. |
It works! Thanks a lot! |
To my understanding this programme conforms with r6rs and it runs without problems in racket. IronScheme throws an exception.
The text was updated successfully, but these errors were encountered: