Calling split("") on string hangs program #5119

filipux opened this Issue Dec 13, 2016 · 2 comments


None yet

2 participants

filipux commented Dec 13, 2016

In some languages calling split("") on a string will conveniently return a list of it's characters. For example, running "hello".split("") in javascript will return ["h", "e", "l", "l", "o"]

In nim, the same code will hang the program indefinitely.

Nim Compiler Version 0.15.2 (2016-10-22) [MacOSX: amd64]

dom96 commented Dec 13, 2016

Related discussion on the forum:

@dom96 dom96 added the Stdlib label Dec 13, 2016
dom96 commented Dec 13, 2016

As mentioned in the forum this should raise an error just like in Python.

@dom96 dom96 added the Easy label Dec 13, 2016
@chrisheller chrisheller added a commit to chrisheller/Nim that referenced this issue Dec 22, 2016
@chrisheller chrisheller Revert commits that were for #5119 from fix for #5120 479361e
@Araq Araq closed this in 40d034b Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment