Re: [Vala] RAII support in VALA¿??¿?
- From: "Martin (OpenGeoMap)" <martin opengeomap org>
- Cc: vala-list gnome org
- Subject: Re: [Vala] RAII support in VALA¿??¿?
- Date: Tue, 23 Sep 2008 09:48:11 +0200
hi:
have Vala suppor to RAII like c++, D, c# or ruby???
http://en.wikipedia.org/wiki/Resource_acquisition_is_initialization
In c# something like this:
string line;
*using (StreamReader sr = new StreamReader("file.txt"))*
{
line = sr.ReadLine();
}
// **sr ** is closed already!!!!!
In ruby something like this:
File.open("logfile.txt", "w+") do |logfile|
logfile.write("hello logfile!")
end
#logfile is closed!!!!!!
regards.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]