On Tuesday, 2 June 2020 at 20:08:09 UTC, bauss wrote:
What happens if you have the same symbol in multiple modules?
Ex. two libraries that implement symbols with same name.
First module will inserted.
Is there a way to be selective?
I want it too! :)
And what about keyboard shortcut?
On Wednesday, 27 May 2020 at 10:30:36 UTC, wjoe wrote:
Could you please elaborate why checked exceptions are more
annoying?
Have like 3 functions : A calls B, B calls C .
Imagine that now you need to throw a checked exception on C, that
before wasn't necessary.
You need to add the
On Tuesday, 2 June 2020 at 13:58:13 UTC, Bienlein wrote:
On Wednesday, 27 May 2020 at 11:40:00 UTC, Mike Parker wrote:
On Wednesday, 27 May 2020 at 10:30:36 UTC, wjoe wrote:
[...]
For me, it's because they require all functions that touch
them to either try/catch or include an exception
On Tuesday, 2 June 2020 at 20:38:40 UTC, Steven Schveighoffer
wrote:
On 6/2/20 10:51 AM, realhet wrote:
On Tuesday, 2 June 2020 at 13:10:55 UTC, Paul Backus wrote:
On Tuesday, 2 June 2020 at 09:28:01 UTC, realhet wrote:
A month ago I discovered that mixinDeclarations can be used for
types
On Monday, 1 June 2020 at 17:28:16 UTC, Johannes Loher wrote:
On Monday, 1 June 2020 at 16:18:44 UTC, Виталий Фадеев wrote:
[...]
Demanding stuff usually doesn't work in this community. The
usual answer is something like this: If you care about this,
implement it yourself or pay somebody to
On Wednesday, 3 June 2020 at 11:48:27 UTC, Виталий Фадеев wrote:
Use case:
I have class for Windows OS.
I not implement class for Linux.
I want message about it. When code compiled under Linux.
You could use `static assert(false, "Message");` to make it an
error.
On Wednesday, 3 June 2020 at 11:56:26 UTC, MrSmith wrote:
On Wednesday, 3 June 2020 at 11:48:27 UTC, Виталий Фадеев wrote:
Use case:
I have class for Windows OS.
I not implement class for Linux.
I want message about it. When code compiled under Linux.
You could use `static assert(false,
I'm generating some code. Some of the generated types need to be
overridden, so I define them manually at the top of the generated
file. Then I need to guard against redefining the identifier
(type/value/function) later on, in the generated code.
I'm currently using `static if
On Wednesday, 3 June 2020 at 09:36:52 UTC, drathier wrote:
Currently at ~1ksloc/s of d input without optimizing anything,
which corresponds to 350ksloc/s if measuring by `-vcg-ast`
output instead of d source input, while using the same time
measurement from before, so the flag doesn't cost
On Wednesday, 3 June 2020 at 07:19:45 UTC, Luis wrote:
On Wednesday, 27 May 2020 at 10:30:36 UTC, wjoe wrote:
Could you please elaborate why checked exceptions are more
annoying?
Have like 3 functions : A calls B, B calls C .
[...]
I work daily with Java, and it's pretty annoying. That
Use case:
I have class for Windows OS.
I not implement class for Linux.
I want message about it. When code compiled under Linux.
Example:
version ( Windows )
{
public import ui.sys.windows.event.keyboardevent;
}
else
{
pragma( msg, "Unsupported OS" );
}
How to make red color message
On Wednesday, 3 June 2020 at 09:39:34 UTC, Basile B. wrote:
You can use this template:
enum Exists(alias T) = is(typeof(T));
I don't know if there's a faster way bu this technic is used,
notatbly in phobos, to workaroud issues of double declaration
in `static foreach`
enum Exists(alias
I'm wondering if there's a place that lists things which are
slower/faster to compile? DMD is pretty famed for compiling
quickly, but I'm not seeing particularly high speed at all, and I
want to fix that.
Currently at ~1ksloc/s of d input without optimizing anything,
which corresponds to
On Wednesday, 3 June 2020 at 09:03:22 UTC, drathier wrote:
I'm generating some code. Some of the generated types need to
be overridden, so I define them manually at the top of the
generated file. Then I need to guard against redefining the
identifier (type/value/function) later on, in the
On Wednesday, 3 June 2020 at 10:11:59 UTC, realhet wrote:
On Tuesday, 2 June 2020 at 20:38:40 UTC, Steven Schveighoffer
wrote:
On 6/2/20 10:51 AM, realhet wrote:
On Tuesday, 2 June 2020 at 13:10:55 UTC, Paul Backus wrote:
On Tuesday, 2 June 2020 at 09:28:01 UTC, realhet wrote:
mixin("int[",
C:\Users\vaida\Desktop\Associative Array Sorting> rdmd
testingGround.d
0. The quick brown fox jumps over the lazy dog
nonononoahahahaha Sphinx of black quartz, judge my vow.
2. # How vexingly quick daft zebras jump!
3. # The five boxing wizards jump quickly
4. # Maecenas consectetur risus a
On Wednesday, 3 June 2020 at 18:23:51 UTC, BoQsc wrote:
Here you can see ". hahahahahahaha" and "nononono" and even
lineNumber is being merged into the same position. Why is this
happening and can this be simply resolved?
Your string in "line" has a carriage return character at the end,
On 6/3/20 2:23 PM, BoQsc wrote:
C:\Users\vaida\Desktop\Associative Array Sorting> rdmd testingGround.d
0. The quick brown fox jumps over the lazy dog
nonononoahahahaha Sphinx of black quartz, judge my vow.
2. # How vexingly quick daft zebras jump!
3. # The five boxing wizards jump quickly
4. #
On Wednesday, 3 June 2020 at 09:39:34 UTC, Basile B. wrote:
On Wednesday, 3 June 2020 at 09:03:22 UTC, drathier wrote:
[...]
You can use this template:
enum Exists(alias T) = is(typeof(T));
I don't know if there's a faster way bu this technic is used,
notatbly in phobos, to workaroud
On Wed, Jun 03, 2020 at 09:36:52AM +, drathier via Digitalmars-d-learn
wrote:
> I'm wondering if there's a place that lists things which are
> slower/faster to compile? DMD is pretty famed for compiling quickly,
> but I'm not seeing particularly high speed at all, and I want to fix
> that.
On Wednesday, 3 June 2020 at 13:24:17 UTC, Basile B. wrote:
This is because the template parameter must be resolved to a
valid symbol or type.
This version other version bypass the problem:
---
enum Exists(string s) = is(typeof(mixin(s)));
void main()
{
static if (!Exists!"foo")
On Wednesday, 3 June 2020 at 10:24:44 UTC, Simen Kjærås wrote:
On Wednesday, 3 June 2020 at 09:39:34 UTC, Basile B. wrote:
You can use this template:
enum Exists(alias T) = is(typeof(T));
I don't know if there's a faster way bu this technic is used,
notatbly in phobos, to workaroud issues
Removing the last element of the string got it resolved.
Might not be the best way and adding additional check for
carriage return before removing the element would be better, so
this is only initial proof.
Improved example with the above comments resolved.
testingGround.d
import
On Wednesday, 3 June 2020 at 19:53:03 UTC, BoQsc wrote:
Removing the last element of the string got it resolved.
Might not be the best way and adding additional check for
carriage return before removing the element would be better,
so this is only initial proof.
Improved example with the
On Wednesday, 3 June 2020 at 20:05:52 UTC, ttk wrote:
On Wednesday, 3 June 2020 at 19:53:03 UTC, BoQsc wrote:
Removing the last element of the string got it resolved.
Might not be the best way and adding additional check for
carriage return before removing the element would be better,
so this
On Wed, Jun 03, 2020 at 08:43:43PM +, BoQsc via Digitalmars-d-learn wrote:
> On Wednesday, 3 June 2020 at 20:05:52 UTC, ttk wrote:
[...]
> > That works, but consider using chomp() instead.
> >
> > https://dlang.org/phobos/std_string.html#.chomp
>
> Chomp sounds kind of funny hahaha.
> Who
On Wednesday, 3 June 2020 at 18:49:38 UTC, ttk wrote:
On Wednesday, 3 June 2020 at 18:23:51 UTC, BoQsc wrote:
Here you can see ". hahahahahahaha" and "nononono" and even
lineNumber is being merged into the same position. Why is this
happening and can this be simply resolved?
Your string in
On Wednesday, 3 June 2020 at 11:54:57 UTC, Виталий Фадеев wrote:
On Tuesday, 2 June 2020 at 20:08:09 UTC, bauss wrote:
What happens if you have the same symbol in multiple modules?
Ex. two libraries that implement symbols with same name.
First module will inserted.
Is there a way to be
On Tuesday, 2 June 2020 at 13:58:13 UTC, Bienlein wrote:
Because of the problems with checked exceptions they were
deliberately left out in C#. Here is an interview with Anders
Hejlsberg, the creator of C# at MS, where he explains the
reasons for this decision:
29 matches
Mail list logo