On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
What are you stuck at? What was the most difficult features to
understand? etc.
To make it more meaningful, what is your experience with other
languages?
Ali
When i take old library from a dub or github and cannot compile
it
On Thursday, 12 May 2022 at 02:40:09 UTC, zjh wrote:
And C++'s `stackless coroutine`.
Another one,
I hope the `error message` can be adapted to different languages
like `chinese/german/russion/turkish` etc.
On Tuesday, 10 May 2022 at 03:22:04 UTC, MichaelBi wrote:
s is the string, and print result as following:
s.array.sort!("athen how to transfer into
[['A',231],['C',247],['G',240],['T',209]]? tried map!, but can
only sortout key or value... tried array(), but result is not
sorted
On Wednesday, 11 May 2022 at 20:53:21 UTC, Marvin Hannott wrote:
On Wednesday, 11 May 2022 at 20:23:07 UTC, Ali Çehreli wrote:
[...]
Yeah, but you can't return `Cat` . And the documentation for
`scoped` says:
[...]
That's kinda very limiting.
Anyway, I cooked up another idea based on
On Thursday, 12 May 2022 at 02:35:50 UTC, zjh wrote:
`C++`'s `concept` and `...` is very convenient.
And C++'s `stackless coroutine`.
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
What are you stuck at? What was the most difficult features to
understand? etc.
I don't know the progress of `interface to C++`.
I want to use my C++ functions in `d`.
`C++`'s `concept` and `...` is very convenient.
On 5/11/22 9:06 PM, Christopher Katko wrote:
I just realized foreach copies by value by default. Maybe. Sometimes.
When? I don't even know anymore. Because I "thought" I had to use
foreach(ref) to be able to affect the original data structure (because
by value means its a copy, right?).
On Thursday, 12 May 2022 at 01:06:02 UTC, Christopher Katko wrote:
completely different semantics for a class vs a struct. Is it a
reference? Is it a value? Look up the entire declaration and
have the entire Dlang manual open to find out.
As far as I remember, no automatic RAII support, even
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
What are you stuck at? What was the most difficult features to
understand? etc.
To make it more meaningful, what is your experience with other
languages?
Ali
Every time I think I understand D, I don't.
Cool useful library
On 5/11/22 11:27, templatedperson wrote:
> I don't know if this counts as a feature, but reading the standard
> library documentation was especially difficult. There are a ton of
> `auto`s everywhere and function signatures are hard to read because of
> that. I got used to confusing function
On Wednesday, 11 May 2022 at 20:23:07 UTC, Ali Çehreli wrote:
On 5/11/22 13:06, Marvin Hannott wrote:
> I appreciate the answer, don't much like the "solutions".
Me neither. :)
> It's not so much about copying
Great!
> scoped class objects should have value semantics.
std.typecons.scoped
On 5/9/22 22:12, MichaelBi wrote:
> On Tuesday, 10 May 2022 at 04:21:04 UTC, Ali Çehreli wrote:
>> On 5/9/22 20:38, rikki cattermole wrote:
>>
>> > [...]
>>
>> Yes! :)
>>
>> Assuming the data is indeed validated in some way, the following
>> should be even faster. It validates the data after the
On 5/11/22 13:06, Marvin Hannott wrote:
> I appreciate the answer, don't much like the "solutions".
Me neither. :)
> It's not so much about copying
Great!
> scoped class objects should have value semantics.
std.typecons.scoped does exactly that:
On Wednesday, 11 May 2022 at 14:44:59 UTC, Ali Çehreli wrote:
On 5/11/22 06:57, Marvin Hannott wrote:
> I understand that D's classes solve some particular problems.
However,
> they also cause problems because they cannot be copied when
scoped. So
> how do I get virtual methods on a copyable
On 5/11/22 12:20, Ola Fosheim Grøstad wrote:
> On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
>> What are you stuck at? What was the most difficult features to
>> understand? etc.
>
> Also, if you intend to use the responses for planning purposes
No. :) I was hoping to get
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
What are you stuck at? What was the most difficult features to
understand? etc.
Also, if you intend to use the responses for planning purposes,
keep in mind that people who read the forums regularly are more
informed about
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
What are you stuck at? What was the most difficult features to
understand? etc.
- How to do deterministic destruction with programs that use
everything (struct / class / dynamic dispatch / GC / manual /
etc). This requires to
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
What are you stuck at? What was the most difficult features to
understand? etc.
I don't know if this counts as a feature, but reading the
standard library documentation was especially difficult. There
are a ton of `auto`s
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
What are you stuck at? What was the most difficult features to
understand? etc.
No singular feature, but the overall cognitive load if you use
the language sporadic. Which could be most users that don't use
it for work or have it
On Wednesday, 11 May 2022 at 09:06:52 UTC, bauss wrote:
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
What are you stuck at? What was the most difficult features to
understand? etc.
To make it more meaningful, what is your experience with other
languages?
Ali
dip1000
On Wed, May 11, 2022 at 03:34:12PM +, Paul Backus via Digitalmars-d-learn
wrote:
> On Wednesday, 11 May 2022 at 15:10:28 UTC, Tejas wrote:
> > That'll be true the day when `@safe` becomes the default... Until
> > then, I'll atleast do `@safe:` on top of every module :)
>
> `@safe:` is
On Wednesday, 11 May 2022 at 12:29:05 UTC, Basile B. wrote:
How about being more explicit in the UDA ?
The idea would be to associate the enum value to a type or not:
I think that could work but would require some major changes to
my existing code. Also, I think I'd prefer:
```
@Token{
On Wednesday, 11 May 2022 at 15:10:28 UTC, Tejas wrote:
That'll be true the day when `@safe` becomes the default...
Until then, I'll atleast do `@safe:` on top of every module :)
`@safe:` is actually a bad idea if you're writing templated code,
because it turns inference of `@system` into a
On Wednesday, 11 May 2022 at 14:20:07 UTC, H. S. Teoh wrote:
On Wed, May 11, 2022 at 01:37:21PM +, matheus via
Digitalmars-d-learn wrote:
> [...]
[...]
[...]
[...]
My suggestion is: when prototyping, don't even think about
attributes. Just templatize your functions and let the compiler
On 5/11/22 06:57, Marvin Hannott wrote:
> I understand that D's classes solve some particular problems. However,
> they also cause problems because they cannot be copied when scoped. So
> how do I get virtual methods on a copyable stack object?
Problems classes solve don't usually need copying
On Wed, May 11, 2022 at 01:37:21PM +, matheus via Digitalmars-d-learn wrote:
> On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
> > What are you stuck at? What was the most difficult features to
> > understand? etc.
> >
> > To make it more meaningful, what is your experience with
Hi everybody!
I understand that D's classes solve some particular problems.
However, they also cause problems because they cannot be copied
when scoped. So how do I get virtual methods on a copyable stack
object?
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
What are you stuck at? What was the most difficult features to
understand? etc.
To make it more meaningful, what is your experience with other
languages?
Ali
I don't know if this will be helpful but here it goes, my user
case
On Tuesday, 10 May 2022 at 16:10:26 UTC, Ben Jones wrote:
On Tuesday, 10 May 2022 at 16:05:15 UTC, H. S. Teoh wrote:
Using wrapper structs, etc., for this is IMO total overkill.
Just use an enum for your token types. Something like this
would suffice:
That's basically what sumtype is going
On Wednesday, 11 May 2022 at 10:01:18 UTC, Johan wrote:
Any function call (inside the loop) for which it cannot be
proven that it never modifies your memory variable will work.
That's why I'm pretty sure that mutex lock/unlock will work.
Thank you, in C I would not have been surprised. It
On Wednesday, 11 May 2022 at 09:34:20 UTC, ichneumwn wrote:
Hi Forum,
I have a snippet of code as follows:
```
extern(C) extern __gshared uint g_count;
// inside a class member function:
while(g_count) <= count) {}
```
This is from a first draft of the code without proper thread
Compiler optimizations should not be defined by a programming language
specification.
This will be on LLVM.
Hi Forum,
I have a snippet of code as follows:
```
extern(C) extern __gshared uint g_count;
// inside a class member function:
while(g_count) <= count) {}
```
This is from a first draft of the code without proper thread
synchronisation. The global variable g_count is updated from a
bit of
On Wednesday, 11 May 2022 at 05:41:35 UTC, Ali Çehreli wrote:
What are you stuck at? What was the most difficult features to
understand? etc.
To make it more meaningful, what is your experience with other
languages?
Ali
dip1000
34 matches
Mail list logo