Skip to content

Conversation

@JackStouffer
Copy link
Contributor

The main points:

  1. The constraints for sicmp were completely wrong because decode cannot be called with forward ranges. In the future this could be made to work with forward ranges but for now this needs to be fixed
  2. Emphasized the fact that icmp can be @nogc @safe nothrow pure if used with byUTF.
  3. Added more detail to icmp's docs

@JackStouffer
Copy link
Contributor Author

@wilzbach @Hackerpilot what's with the random travis error?

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
15964 The template constraints for std.uni.sicmp are too permissive

std/uni.d Outdated
* By using $(XREF utf, byUTF) and its aliases, GC allocations via auto-decoding
* and thrown exceptions can be avoided.
*/
@safe nothrow pure unittest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add nogc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't with string literals.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ehm.. They are static what's wrong with it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I guess you can add it. I thought that the rules about array literals applied to string literals.

@wilzbach
Copy link
Contributor

@wilzbach @Hackerpilot what's with the random travis error?

Should be fixed once #4255 kicks in. Sorry about that :/

@JackStouffer
Copy link
Contributor Author

@DmitryOlshansky fixed

@DmitryOlshansky
Copy link
Member

LGTM

@DmitryOlshansky
Copy link
Member

Auto-merge toggled on

{
import std.utf : byDchar;

assert(icmp("Rußland".byDchar, "Russland".byDchar) == 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait what???
In German (my mother tongue) this is not guaranteed to be correct. From Wikipedia:

Thus it helps to distinguish words like Buße (long vowel) 'penance, fine' and Busse (short vowel) 'buses'.

https://en.m.wikipedia.org/wiki/%C3%9F

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is caseless comparison and follows rules of Unicode

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is caseless comparison and follows rules of Unicode

Oh sorry. Overlooked from my phone :/

@DmitryOlshansky DmitryOlshansky merged commit d69cab1 into dlang:master Apr 29, 2016
@JackStouffer JackStouffer deleted the sicmp branch April 29, 2016 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants