for example:
function void a(int i) {
writeln(i);
}
auto JSFunction(alias F)() if(isSomeFunction!F) {
class S {
public ReturnType!F dg(ParameterTypeTuple!F) {
mixin(F.body) // what should i do ???
}
}
}
thank you
On Wednesday, 17 June 2020 at 11:50:27 UTC, Per Nordlöw wrote:
Should a range-compliant aggregate type realizing a parser be
encoded as a struct or class? In dmd `Lexer` and `Parser` are
both classes.
In general how should I reason about whether an aggregate type
should be encoded as a
Oh an also https://github.com/dlang/dmd/pull/9899
On Wednesday, 17 June 2020 at 14:32:09 UTC, Adam D. Ruppe wrote:
On Wednesday, 17 June 2020 at 14:24:01 UTC, Stefan Koch wrote:
Parser in dmd does even inherit from Lexer.
why would a parser ever inherit from a lexer?
So you can write nextToken() instead of lexer.nextToken()
On Wednesday, 17 June 2020 at 11:50:27 UTC, Per Nordlöw wrote:
Should a range-compliant aggregate type realizing a parser be
encoded as a struct or class? In dmd `Lexer` and `Parser` are
both classes.
In general how should I reason about whether an aggregate type
should be encoded as a
On Wed, Jun 17, 2020 at 02:32:09PM +, Adam D. Ruppe via Digitalmars-d-learn
wrote:
> On Wednesday, 17 June 2020 at 14:24:01 UTC, Stefan Koch wrote:
> > Parser in dmd does even inherit from Lexer.
>
> why would a parser ever inherit from a lexer?
Because, unlike a regular parser-driven compil
On Wednesday, 17 June 2020 at 14:24:01 UTC, Stefan Koch wrote:
Parser in dmd does even inherit from Lexer.
why would a parser ever inherit from a lexer?
On Wednesday, 17 June 2020 at 11:50:27 UTC, Per Nordlöw wrote:
Should a range-compliant aggregate type realizing a parser be
encoded as a struct or class? In dmd `Lexer` and `Parser` are
both classes.
In general how should I reason about whether an aggregate type
should be encoded as a
On Wed, Jun 17, 2020 at 11:50:27AM +, Per Nordlöw via Digitalmars-d-learn
wrote:
> Should a range-compliant aggregate type realizing a parser be encoded
> as a struct or class?
Preferably a struct IMO, but see below.
> In dmd `Lexer` and `Parser` are both classes.
Probably for h
On Wednesday, 17 June 2020 at 11:50:27 UTC, Per Nordlöw wrote:
Should a range-compliant aggregate type realizing a parser be
encoded as a struct or class? In dmd `Lexer` and `Parser` are
both classes.
In general how should I reason about whether an aggregate type
should be encoded as a
On Wednesday, 17 June 2020 at 11:50:27 UTC, Per Nordlöw wrote:
Should a range-compliant aggregate type realizing a parser be
encoded as a struct or class? In dmd `Lexer` and `Parser` are
both classes.
In general how should I reason about whether an aggregate type
should be encoded as a
Should a range-compliant aggregate type realizing a parser be
encoded as a struct or class? In dmd `Lexer` and `Parser` are
both classes.
In general how should I reason about whether an aggregate type
should be encoded as a struct or class?
On Sunday, 14 August 2016 at 15:53:21 UTC, ag0aep6g wrote:
On 08/14/2016 04:27 PM, Uranuz wrote:
[...]
Looks like a compiler bug, since it works without the struct:
import std.algorithm: map;
import std.array: array;
import std.typecons: tuple;
immutable aaa = [
tuple("1", "one
On 08/14/2016 04:27 PM, Uranuz wrote:
Greatings!
I need help with these lines bellow. I don't understand why it doesn't
compile. Is it bug somewhere in Phobos or compiler? Or just I wrote smth
wrong?
//-
struct A
{
import std.algorithm: map;
import std.array: array;
import std
Greatings!
I need help with these lines bellow. I don't understand why it
doesn't compile. Is it bug somewhere in Phobos or compiler? Or
just I wrote smth wrong?
//-
struct A
{
import std.algorithm: map;
import std.array: array;
import std.typecons: tuple;
On Sunday, 24 August 2014 at 11:56:44 UTC, nikki wrote:
I come from languages that don't offer structs, I have this
json load function that has to keep some data and intuitively
I've written a struct, I've read about the differences, heap vs
stack, value vs reference, but know I think i am over
On Sun, 24 Aug 2014 11:56:42 +
nikki via Digitalmars-d-learn wrote:
> Or should I use a class for that AtlasSpriteData?
> reading about it I get the impression everytime I'll look up data
> from that dictionary data will get copied ?
p.s.
this will not copy:
auto sd = "mysprite00" in dic
On Sun, 24 Aug 2014 11:56:42 +
nikki via Digitalmars-d-learn wrote:
> Or should I use a class for that AtlasSpriteData?
> reading about it I get the impression everytime I'll look up data
> from that dictionary data will get copied ?
this will copy:
auto sd = dict[0];
this will copy:
On Sunday, 24 August 2014 at 11:56:44 UTC, nikki wrote:
I come from languages that don't offer structs, I have this
json load function that has to keep some data and intuitively
I've written a struct, I've read about the differences, heap vs
stack, value vs reference, but know I think i am over
On 24/08/2014 11:56 p.m., nikki wrote:
I come from languages that don't offer structs, I have this json load
function that has to keep some data and intuitively I've written a
struct, I've read about the differences, heap vs stack, value vs
reference, but know I think i am overthinking it.
Here
I come from languages that don't offer structs, I have this json
load function that has to keep some data and intuitively I've
written a struct, I've read about the differences, heap vs stack,
value vs reference, but know I think i am overthinking it.
Is this decent:
bool loadFromFile
21 matches
Mail list logo