Missing Language Feature
-
I'm still waiting for a language that allows:
namespace Foo
{
namespace Bar
{
class Fuzz
{
enum OptionsForGetIt
{
Current = 0,
Default = 1
}
public string GetIt(Foo.Bar.AllTheStaticFuzz.OptionsForGetIt opt) { ... }
}
}
}namepsace SomethingCompletelyDifferent
{
...
string s = Foo.Bar.Fuzz.GetIt(Current)
}Seriously.
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
Linkify! || Fold With Us! || sighist -
I'm still waiting for a language that allows:
namespace Foo
{
namespace Bar
{
class Fuzz
{
enum OptionsForGetIt
{
Current = 0,
Default = 1
}
public string GetIt(Foo.Bar.AllTheStaticFuzz.OptionsForGetIt opt) { ... }
}
}
}namepsace SomethingCompletelyDifferent
{
...
string s = Foo.Bar.Fuzz.GetIt(Current)
}Seriously.
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
Linkify! || Fold With Us! || sighistYeah it sucks, all those namespaces. Importing them all at the top of the file makes a very long intellisense list, and not importing them makes very long code lines. What about namespace/class importing in brackets?
namespace SomethingCompletelyDifferent
{
...
using Foo.Bar.Fuzz {
string s = GetIt(OptionsForGetIt.Current);
}
...
}BTW, in VB.Net (don't laugh people :rolleyes:) you can do
Imports Fuzz = Foo.Bar.Fuzz
orImports FB = Foo.Bar
You can't do that in C#?
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.." -- Mark McCormick
|| Fold With Us! || Pensieve || VG.Net ||
-
Yeah it sucks, all those namespaces. Importing them all at the top of the file makes a very long intellisense list, and not importing them makes very long code lines. What about namespace/class importing in brackets?
namespace SomethingCompletelyDifferent
{
...
using Foo.Bar.Fuzz {
string s = GetIt(OptionsForGetIt.Current);
}
...
}BTW, in VB.Net (don't laugh people :rolleyes:) you can do
Imports Fuzz = Foo.Bar.Fuzz
orImports FB = Foo.Bar
You can't do that in C#?
"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.." -- Mark McCormick
|| Fold With Us! || Pensieve || VG.Net ||
[Marc] wrote:
You can't do that in C#?
You can: using Fuzz = Foo.Bar.Fuzz
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -Brian Kernighan
-
I'm still waiting for a language that allows:
namespace Foo
{
namespace Bar
{
class Fuzz
{
enum OptionsForGetIt
{
Current = 0,
Default = 1
}
public string GetIt(Foo.Bar.AllTheStaticFuzz.OptionsForGetIt opt) { ... }
}
}
}namepsace SomethingCompletelyDifferent
{
...
string s = Foo.Bar.Fuzz.GetIt(Current)
}Seriously.
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
Linkify! || Fold With Us! || sighistWell, if we stick to namespaces, argument dependent (or Koenig) lookup gives you something similar for C++ - this would (I think) be legal - it compiles, anyway:
struct string; namespace Foo { namespace Bar { namespace Fuzz { enum OptionsForGetIt { Current = 0, Default = 1 }; string* GetIt(OptionsForGetIt opt); } } } namespace SomethingCompletelyDifferent { string* s = GetIt(Foo::Bar::Fuzz::Current); }
-
I'm still waiting for a language that allows:
namespace Foo
{
namespace Bar
{
class Fuzz
{
enum OptionsForGetIt
{
Current = 0,
Default = 1
}
public string GetIt(Foo.Bar.AllTheStaticFuzz.OptionsForGetIt opt) { ... }
}
}
}namepsace SomethingCompletelyDifferent
{
...
string s = Foo.Bar.Fuzz.GetIt(Current)
}Seriously.
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
Linkify! || Fold With Us! || sighistWell, if we stick to namespaces, argument dependent (or Koenig) lookup gives you something similar for C++ - this would (I think) be legal - it compiles, anyway:
struct string; namespace Foo { namespace Bar { namespace Fuzz { enum OptionsForGetIt { Current = 0, Default = 1 }; string* GetIt(OptionsForGetIt opt); } } } namespace SomethingCompletelyDifferent { string* s = GetIt(Foo::Bar::Fuzz::Current); }