On 2016-08-16 17:08, ZombineDev wrote:
Swift developers, on the other hand, explicitly state that they don't
want to support any form compile-time metaprogramming: [5]. Ironically
they make heavy use of it in their standard-library. However instead of
writing the meta code in Swift, they use
On Tue, 16 Aug 2016 10:24:38 +, Kagamin wrote:
> On Monday, 15 August 2016 at 14:40:14 UTC, Chris Wright wrote:
>> You still haven't defined the term "design by introspection". Some
>> searching around says it's the pattern of:
>>
>> template Foo(T) {
>> static if (is(typeof(T.bar)) {
>>
On Monday, 15 August 2016 at 14:40:14 UTC, Chris Wright wrote:
On Mon, 15 Aug 2016 06:43:11 +, ZombineDev wrote:
Well, I guess it would hard for me to convince you if you
don't know what Design by Introspection means.
Some years ago I was on #d on freenode and someone made a
reference to
On Tuesday, 16 August 2016 at 06:13:18 UTC, Ethan Watson wrote:
[snip]
At this point, the only thing I still haven't found concrete
information on is function inspection in Swift and Rust, which
should be a mark against the languages if it's not easily
Googlable.
From what I could find,
On Monday, 15 August 2016 at 14:40:14 UTC, Chris Wright wrote:
You still haven't defined the term "design by introspection".
Some searching around says it's the pattern of:
template Foo(T) {
static if (is(typeof(T.bar)) {
// preferred implementation takes advantage of T.bar
} else {
On Tuesday, 16 August 2016 at 06:36:25 UTC, Jacob Carlborg wrote:
On 2016-08-16 08:13, Ethan Watson wrote:
For Objective-C it's possible to use the Objective-C runtime
functions to access some of this information. Based on a method
you can access the types of the arguments and the return
On 2016-08-16 08:13, Ethan Watson wrote:
At this point, the only thing I still haven't found concrete information
on is function inspection in Swift and Rust, which should be a mark
against the languages if it's not easily Googlable.
For Objective-C it's possible to use the Objective-C
On Saturday, 13 August 2016 at 19:34:42 UTC, Walter Bright wrote:
It's risky to compare with languages you aren't strongly
familiar with. All it takes is one mistake and one audience
member who knows more than you about it, and it can seriously
derail and damage the entire presentation.
I
On Sunday, 14 August 2016 at 18:05:12 UTC, ZombineDev wrote:
Rust stugg
Exactly what I was after, thanks.
On Monday, 15 August 2016 at 14:40:14 UTC, Chris Wright wrote:
You still haven't defined the term "design by introspection".
Some searching around says it's the pattern of:
template Foo(T) {
static if (is(typeof(T.bar)) {
// preferred implementation takes advantage of T.bar
} else {
On Mon, 15 Aug 2016 06:43:11 +, ZombineDev wrote:
> Well, I guess it would hard for me to convince you if you don't know
> what Design by Introspection means.
Some years ago I was on #d on freenode and someone made a reference to
high-order functions. I hadn't encountered the term, so I
On Sunday, 14 August 2016 at 23:50:23 UTC, Enamex wrote:
On Sunday, 14 August 2016 at 18:57:14 UTC, ZombineDev wrote:
Ok, maybe it's a matter of taste and opinion, but I consider
them to be bad design (idea-wise, not implementation-wise)
because they're sort of the opposite of DbI and
On Sunday, 14 August 2016 at 18:57:14 UTC, ZombineDev wrote:
Ok, maybe it's a matter of taste and opinion, but I consider
them to be bad design (idea-wise, not implementation-wise)
because they're sort of the opposite of DbI and compile-time
duck-typing. Maybe they fit nicely in Rust's world
On Sunday, 14 August 2016 at 18:17:58 UTC, Enamex wrote:
On Sunday, 14 August 2016 at 18:05:12 UTC, ZombineDev wrote:
[...]
OTOH, they're used in more places in their standard library,
than mixins are used in Phobos, because of the lack of
variadic templates, because in Rust you can't
On Sunday, 14 August 2016 at 18:05:12 UTC, ZombineDev wrote:
[...]
OTOH, they're used in more places in their standard library,
than mixins are used in Phobos, because of the lack of variadic
templates, because in Rust you can't generalize over
mutability, like you can in D with `inout` and
On Saturday, 13 August 2016 at 12:47:40 UTC, Ethan Watson wrote:
So I fly to Cologne tomorrow morning, and will be presenting on
Tuesday. Got my talk written, gave it a dry run at the office
and got feedback on it. Seems to be in a good spot.
But before I go up and feature compare to other
On Sat, 13 Aug 2016 17:21:37 +, Ethan Watson wrote:
> On Saturday, 13 August 2016 at 17:19:42 UTC, Chris Wright wrote:
>> C# can do this. Check System.Reflection.MethodInfo and
>> System.Reflection.ParameterInfo.
>
> Runtime only? I'll make the distinction on my slides.
Runtime only, but
On 8/13/2016 9:19 AM, Ethan Watson wrote:
I believe Swift has something like Objective C does but I did not find concrete
info on it. No idea about Rust.
It's risky to compare with languages you aren't strongly familiar with. All it
takes is one mistake and one audience member who knows more
On 8/13/2016 5:47 AM, Ethan Watson wrote:
[2] Mixins in swift are essentially traits and protocol extentions, not like D
mixins at all
s/extentions/extensions/
On Saturday, 13 August 2016 at 12:47:40 UTC, Ethan Watson wrote:
| Rust | Swift |C# |
-|-+-+-|
Template Constraints |Y|Y| where | [1]
On Saturday, 13 August 2016 at 17:27:35 UTC, Chris Wright wrote:
On Sat, 13 Aug 2016 16:28:57 +, deadalnix wrote:
C# use generic (aka type erasure) for objects
Incorrect:
---
public class Foo {}
var fooList = new List();
var objectList = (List)(object)fooList;
---
This throws
On Sat, 13 Aug 2016 16:28:57 +, deadalnix wrote:
> C# use generic (aka type erasure) for objects
Incorrect:
---
public class Foo {}
var fooList = new List();
var objectList = (List)(object)fooList;
---
This throws InvalidCastException. Which isn't possible with type erasure.
The equivalent
On Saturday, 13 August 2016 at 17:19:42 UTC, Chris Wright wrote:
C# can do this. Check System.Reflection.MethodInfo and
System.Reflection.ParameterInfo.
Runtime only? I'll make the distinction on my slides.
On Sat, 13 Aug 2016 16:19:08 +, Ethan Watson wrote:
> On Saturday, 13 August 2016 at 15:51:18 UTC, Jacob Carlborg wrote:
>> What is "Deep function inspection"?
>
> In the context of my talk, a collection of methods to inspect all
> function traits including parameter types and defaults etc.
On Saturday, 13 August 2016 at 13:02:09 UTC, Liam McSherry wrote:
On Saturday, 13 August 2016 at 12:47:40 UTC, Ethan Watson wrote:
| Rust | Swift |C# |
-|-+-+-|
Template Constraints |Y|
On Saturday, 13 August 2016 at 15:51:18 UTC, Jacob Carlborg wrote:
What is "Deep function inspection"?
In the context of my talk, a collection of methods to inspect all
function traits including parameter types and defaults etc. C++
can do type inspection. I believe Swift has something like
On 13/08/16 14:47, Ethan Watson wrote:
So I fly to Cologne tomorrow morning, and will be presenting on Tuesday.
Got my talk written, gave it a dry run at the office and got feedback on
it. Seems to be in a good spot.
But before I go up and feature compare to other languages, it'll be a
good
On Saturday, 13 August 2016 at 13:02:09 UTC, Liam McSherry wrote:
For "static if," C# also has a very limited conditional
compilation system that is barely comparable.
This is covered in more detail in the talk itself when I compare
static if to C style preprocessors. I would hope everyone in
On Saturday, 13 August 2016 at 12:58:36 UTC, ag0aep6g wrote:
What's a 'template "if" constraint'? Template constraints
already use the `if` keyword. This is a template constraint:
template Foo(T) if (is(T : int)) {/* ... */}
Other than those, there are template specializations. Example:
On Saturday, 13 August 2016 at 12:47:40 UTC, Ethan Watson wrote:
| Rust | Swift |C# |
-|-+-+-|
Template Constraints |Y|Y| where | [1]
On 08/13/2016 02:47 PM, Ethan Watson wrote:
| Rust | Swift |C# |
-|-+-+-|
Template Constraints |Y|Y| where | [1]
-|-+-+-|
So I fly to Cologne tomorrow morning, and will be presenting on
Tuesday. Got my talk written, gave it a dry run at the office and
got feedback on it. Seems to be in a good spot.
But before I go up and feature compare to other languages, it'll
be a good idea to get my facts right.
There's
32 matches
Mail list logo