On Sunday, 8 January 2023 at 13:49:22 UTC, DLearner wrote:
I thought dynamic arrays were unavailable under -betterC.
.. ...
See the 'Retained Features' section, and the 'Unavailable
Features' section
https://dlang.org/spec/betterc.html
On Thursday, 5 January 2023 at 17:23:39 UTC, H. S. Teoh wrote:
On Thu, Jan 05, 2023 at 06:32:47AM +, areYouSureAboutThat
Also, I cannot read hex,
[...]
IMNSHO, anyone who claims to be a programmer should at least
know that much.
??
Well, like all, I learnt this at uni. .. as well as
On Thursday, 5 January 2023 at 09:10:00 UTC, areYouSureAboutThat
wrote:
btw. the output (when you forget to use -betterC):
0
1
2
3
4
src/rt/dwarfeh.d:330: uncaught exception reached top of stack
This might happen if you're missing a top level catch in your
fiber or signal handler
I was playing around with betterC, when I discovered, that if i
accidently forget to provide -betterC to the compiler, it will
still compile this, but, there will be no runtime bounds checking
occuring.
My question is: why is there no bounds checking occurring if I
forget to use -betterC?
On Thursday, 5 January 2023 at 04:04:39 UTC, Paul wrote:
..
Do I have this much right?
...
First, i would say, add @safe to your main.
@safe void main() ...
Then you will see you are treading on dangerous waters ;-)
Second, to be sure your getting the correct results, it would be
nice if
On Wednesday, 28 December 2022 at 12:42:24 UTC, thebluepandabear
wrote:
Before even running the code I get an IDE warning (IntelliJ).
Does IntelliJ compile the code in the background?
It will NOT compile successfully unless you do one of these
things:
(1) ensure the result of the 'static
On Wednesday, 28 December 2022 at 02:31:45 UTC, thebluepandabear
wrote:
..
Other errors are only able to be spotted during run time such
as exceptions, dividing by zero, assert blocks.
With regards to the 'assert blocks' you mention, D (like C++) has
both static assert and runtime assert.
On Tuesday, 13 December 2022 at 23:34:45 UTC, Salih Dincer wrote:
We have nothing to do with unsafe stuff! Why do we waste time
with unsafe things; To learn or to teach?
SDB@79
@trusted class unsafeVector ...
now it's @safe ;-)
On Tuesday, 13 December 2022 at 23:34:45 UTC, Salih Dincer wrote:
We have nothing to do with unsafe stuff! Why do we waste time
with unsafe things; To learn or to teach?
SDB@79
btw. I reject your axiom: 'We have nothing to do with unsafe
stuff!'
It is demonstratably not correct, given
On Tuesday, 13 December 2022 at 23:34:45 UTC, Salih Dincer wrote:
We have nothing to do with unsafe stuff! Why do we waste time
with unsafe things; To learn or to teach?
SDB@79
Really?
That example I provided was just to demonstrate that 'yes' you
can implement a container using OOP. I
On Tuesday, 13 December 2022 at 22:33:02 UTC, Ali Çehreli wrote:
Or I can tell what I think, you counter, and we all learn.
Proofs... Axioms... Pfft...
Ali
"I suppose sir, you are going to explain your puzzling remarks."
On Saturday, 10 December 2022 at 06:11:18 UTC, thebluepandabear
wrote:
I was wondering more if there is an object oriented way of
creating arrays, like in Java there is an `ArrayList`, in C++
there is `std::vector`, etc.
of course there is - I mean just imagine if there wasn't ;-)
e.g (an
On Saturday, 10 December 2022 at 15:59:07 UTC, Ali Çehreli wrote:
... Object orientation don't go well with collections
On what basis do you make that assertion?
i.e. Which aspect of OOP programming 'don't go well with
collections'?
Is it encapsulation?
Is it inheritance?
Is it
13 matches
Mail list logo