Re: [Lift] Minor breaking changes -- LiftRules.getResourceAsStream and LiftRules.finder
This change has now been pushed to master. LiftRules.finder() has been removed since it offered (unsafe) duplicate functionality. cheers, alex On Mon, Jan 4, 2010 at 4:03 PM, Alex Boisvert alex.boisv...@gmail.comwrote: Instead of: LiftRules.getResourceAsStream(name: String): Box[InputStream] I'd suggest: LiftRules.doWithResource[T](name: String)(f: InputStream = T): Box[T]. And if you need laziness, you could use one of the usual suspects: lazy val, unapplied function, FatLazy, etc. alex On Thu, Dec 31, 2009 at 3:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, I've changed LiftRules.getResourceAsStream and LiftRules.finder to return Box[Applier[InputStream]] rather than Box[InputStream]. Applier has a single method, apply[T] which takes an InputStream = T and insures the InputStream is closed. This change is unlikely to impact much code out there, but does make sure that InputStreams are closed. If any of the folks out there that name things better than I do (at least I didn't call it Apply_A_Tron), please feel free to suggest name changes, variance changes, etc. Thanks, David -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Minor breaking changes -- LiftRules.getResourceAsStream and LiftRules.finder
On Sat, Jan 9, 2010 at 6:31 AM, Alex Boisvert alex.boisv...@gmail.comwrote: This change has now been pushed to master. LiftRules.finder() has been removed since it offered (unsafe) duplicate functionality. Excellent! Thanks! cheers, alex On Mon, Jan 4, 2010 at 4:03 PM, Alex Boisvert alex.boisv...@gmail.comwrote: Instead of: LiftRules.getResourceAsStream(name: String): Box[InputStream] I'd suggest: LiftRules.doWithResource[T](name: String)(f: InputStream = T): Box[T]. And if you need laziness, you could use one of the usual suspects: lazy val, unapplied function, FatLazy, etc. alex On Thu, Dec 31, 2009 at 3:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, I've changed LiftRules.getResourceAsStream and LiftRules.finder to return Box[Applier[InputStream]] rather than Box[InputStream]. Applier has a single method, apply[T] which takes an InputStream = T and insures the InputStream is closed. This change is unlikely to impact much code out there, but does make sure that InputStreams are closed. If any of the folks out there that name things better than I do (at least I didn't call it Apply_A_Tron), please feel free to suggest name changes, variance changes, etc. Thanks, David -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Minor breaking changes -- LiftRules.getResourceAsStream and LiftRules.finder
On Mon, Jan 4, 2010 at 1:03 PM, Alex Boisvert alex.boisv...@gmail.comwrote: Instead of: LiftRules.getResourceAsStream(name: String): Box[InputStream] I'd suggest: LiftRules.doWithResource[T](name: String)(f: InputStream = T): Box[T]. Sounds good. Please open a ticket and make it happen. ;-) And if you need laziness, you could use one of the usual suspects: lazy val, unapplied function, FatLazy, etc. alex On Thu, Dec 31, 2009 at 3:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, I've changed LiftRules.getResourceAsStream and LiftRules.finder to return Box[Applier[InputStream]] rather than Box[InputStream]. Applier has a single method, apply[T] which takes an InputStream = T and insures the InputStream is closed. This change is unlikely to impact much code out there, but does make sure that InputStreams are closed. If any of the folks out there that name things better than I do (at least I didn't call it Apply_A_Tron), please feel free to suggest name changes, variance changes, etc. Thanks, David -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Minor breaking changes -- LiftRules.getResourceAsStream and LiftRules.finder
Instead of: LiftRules.getResourceAsStream(name: String): Box[InputStream] I'd suggest: LiftRules.doWithResource[T](name: String)(f: InputStream = T): Box[T]. And if you need laziness, you could use one of the usual suspects: lazy val, unapplied function, FatLazy, etc. alex On Thu, Dec 31, 2009 at 3:48 PM, David Pollak feeder.of.the.be...@gmail.com wrote: Folks, I've changed LiftRules.getResourceAsStream and LiftRules.finder to return Box[Applier[InputStream]] rather than Box[InputStream]. Applier has a single method, apply[T] which takes an InputStream = T and insures the InputStream is closed. This change is unlikely to impact much code out there, but does make sure that InputStreams are closed. If any of the folks out there that name things better than I do (at least I didn't call it Apply_A_Tron), please feel free to suggest name changes, variance changes, etc. Thanks, David -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
[Lift] Minor breaking changes -- LiftRules.getResourceAsStream and LiftRules.finder
Folks, I've changed LiftRules.getResourceAsStream and LiftRules.finder to return Box[Applier[InputStream]] rather than Box[InputStream]. Applier has a single method, apply[T] which takes an InputStream = T and insures the InputStream is closed. This change is unlikely to impact much code out there, but does make sure that InputStreams are closed. If any of the folks out there that name things better than I do (at least I didn't call it Apply_A_Tron), please feel free to suggest name changes, variance changes, etc. Thanks, David -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
Re: [Lift] Minor breaking changes -- LiftRules.getResourceAsStream and LiftRules.finder
StreamManager? (as in automatic resource management) Stream Don't like the above that much but nothing better comes to mind. Anyone? Also should it be apply, or doWith for consistency with AnyVars? - David Pollakfeeder.of.the.be...@gmail.com wrote: Folks, I've changed LiftRules.getResourceAsStream and LiftRules.finder to return Box[Applier[InputStream]] rather than Box[InputStream]. Applier has a single method, apply[T] which takes an InputStream = T and insures the InputStream is closed. This change is unlikely to impact much code out there, but does make sure that InputStreams are closed. If any of the folks out there that name things better than I do (at least I didn't call it Apply_A_Tron), please feel free to suggest name changes, variance changes, etc. Thanks, David -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.